Examples

Searching Sun xVM Ops Center 2.0

home Home
Sun xVM Information Exchange
Sun xVM Ops Center 2.1 Documentation
Read Me First
Contact the Wiki Administrators


Get Going

Keep Going

What's Going On

Reference Material

Previous Releases

Index


public API Public API


Examples

This section provides examples on how to use public APIs using JMX and WS-MAN. Java 6 is required to compile or use each of these examples. For more examples, refer to the SDK that is shipped with Sun xVM Ops Center.

Example Description Code
Basic client example using JMX This example demonstrates the basic usage of the JMX Messaging Protocol (JMXMP) connector with JAVA/JMX technology. This example does not require any external JARs except Java and JDMK. This example can be run against both Sun xVM Server or Sun xVM Ops Center.
This example performs the following functions:
  • Configures the connection
  • Performs security settings
  • Opens the connection (locally or remotely)
  • Uses the connection with JMX basic requests
  • Closes the connection
    This example provides a shell script (basic_client) to launch it easily. The usage of this script is:
    basic_client <username> <password> [<remote target>]
BasicClient.java
Basic client example using WS-MAN This example performs the same functions as the previous example. However, this example uses WS-MAN connector with JAVA/JMX technology. This example also can be run against both Sun xVM Server or Sun xVM Ops Center.
This example provides a shell script (simple_client) to launch it easily. The usage of this script is:
simple_client <username> <password> [<remote target>]
SimpleClient.java
Domain model client example using WS-MAN This example demonstrates the usage of the direct access to the read-only copy of the domain model. This example can be run against both Sun xVM Server or Sun xVM Ops Center.
This example performs the following functions:
  • Configures the connection
  • Performs security settings
  • Opens the connection (locally or remotely)
  • Queries the domain model for all the Server objects and displays the value of their Model attributes
  • Queries the domain model for all the OperatingSystems objects and displays the value of their Description attributes
  • Queries the domain model for all the ZoneController objects and displays the value of their ZoneControllerType attributes
  • Queries the domain model for all the ISOImage objects and displays the value of their DiskImagePath attributes
  • Queries the domain model for all the VirtServerImage objects and displays the value of their DomainFilePath attributes
  • Closes the connection
    This example provides a shell script (domain_model_client) to launch it easily. The usage of this script is:
    domain_model_client <username> <password> [<remote target>]
DomainModelClient.java
Discovery and agent provisioning example using WS-MAN This example performs discovery, installs and uninstalls an agent, and deletes gear. OCProvisionClient.java
Utils.java

Labels

examples examples Delete
publicapi publicapi Delete
jmx jmx Delete
ws-man ws-man Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact