com.ibm.websphere.management
Class AdminClientFactory
java.lang.Object
|
+--com.ibm.websphere.management.AdminClientFactory
- public abstract class AdminClientFactory
- extends java.lang.Object
The AdminClientFactory
allows you to create a concrete AdminClient
based on the properties provided; keys for the properties are in the AdminClient class.
The AdminClient is the client-side interface to reach the server side JMX connector which in turn invokes
the AdminService methods; supported AdminClient types are SOAP and RMI.
The required properties for SOAP/RMI based AdminClient are the host name and port number,
which are defined as AdminClient.CONNECTOR_HOST and AdminClient.CONNECTOR_PORT.
The port for SOAP connector is defined within the server.xml of the server your client
connects to. In a single server environment, the default value with the installation is "8880"; in a distributed
environment, the port varies according to the specific configuration. The port for RMI connector is the same
as the naming bootstrap port which is defined in the node serverindex.xml file. The default value in a single
server environment is "2807".
Below is an example to create a SOAP based AdminClient:
java.util.Properties props = new java.util.Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_HOST, "ahost.ibm.com");
props.setProperty(AdminClient.CONNECTOR_PORT, "8880");
AdminClient client = AdminClientFactory.createAdminClient(props);
Method Summary |
static AdminClient |
createAdminClient(java.util.Properties props)
Creates an AdminClient to communicate with a remote AdminService. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AdminClientFactory
public AdminClientFactory()
createAdminClient
public static AdminClient createAdminClient(java.util.Properties props)
throws ConnectorException
- Creates an AdminClient to communicate with a remote AdminService.
- Parameters:
props
- a set of properties to define the AdminClient- Returns:
- an AdminClient connected to a remote AdminService
- Throws:
InvalidAdminClientTypeException
- if an unrecognized connector type is givenConnectorException
- if the AdminClient cannot be created for any other reason