com.ibm.websphere.pmi.client

Class PmiClient

  1. java.lang.Object
  2. extended bycom.ibm.websphere.pmi.client.PmiClient
All implemented interfaces:
PmiConstants

Deprecated. As of 6.0, PMI Client API is replaced with JMX interface and MBean StatisticsProvider model. PMI CpdCollection data structure is replaced by J2EE Performance Data Framework defined in javax.management.j2ee.statistics package.

The PmiClient class is called by client application to access performance data. The purpose is to free the programmer from implementing the remote data access manually.

The class has two set of APIs. One set of APIs are 4.0 APIs, that use PerfDescriptor to get PMI data and the returned PMI data are CpdData/CpdCollection objects. In both 3.5.5+ and 4.0, the PmiClient API looks up a session bean in adminserver and invokes remote APIs on the session bean.

Another set of APIs are JMX-based API new in 5.0. The new APIs use ObjectName/MBeanStatDescriptor to get PMI data via JMX interface.

A brief calling flow is shown here. Details can be found in InfoCenter and sample code. First, a client application needs create an instance of the PmiClient object by passing the correct host name, port number, version name, and JMX connector types. If the PmiClient instance is successfully created, you are ready to call the methods on it to retrieve the data. You need to set the instrumentation level to enable the data for the first time because PMI data is disabled by default. You can call various list methods to navigate the WebSphere domain for nodes, servers, MBeans (or PerfDescriptor for 4.0 API). If you know the names for the node, server, PMI module, or data, you can call pmiClient to create the MBeanStatDescriptor (or PerfDescriptor for 4.0 API) object. Once you get the ObjectName, MBeansStatDescriptor, or PerfDescriptor, you can call the corresponding getXXX methods to get the PMI data.

Note that the setInstrumentationLevel method changes the level at the server side which means it effects other clients monitoring the same server.

Both 4.0 APIs and 5.0 APIs will be supported in 5.0. However, since the returned data are in different types when using 4.0 and 5.0 APIs, it is recommanded that you do not mix the two APIs together.

  1. public class PmiClient
  2. extends java.lang.Object
  3. implements PmiConstants

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT
Deprecated.
  1. static
  2. java.lang.String
DEFAULT_CONNECTOR_PORT
Deprecated.
  1. static
  2. java.lang.String
DEFAULT_CONNECTOR_TYPE
Deprecated.
  1. static
  2. int
FAILED_TO_CREATE_PMISERVICE_BEAN_OBJECT
Deprecated.
  1. static
  2. int
FAILED_TO_DISABLE_DATA
Deprecated.
  1. static
  2. int
FAILED_TO_ENABLE_DATA
Deprecated.
  1. static
  2. int
FAILED_TO_GET_ADMIN_STATE
Deprecated.
  1. static
  2. int
FAILED_TO_GET_DATA
Deprecated.
  1. static
  2. int
FAILED_TO_GET_INITIAL_CONTEXT
Deprecated.
  1. static
  2. int
FAILED_TO_GET_LEVEL
Deprecated.
  1. static
  2. int
FAILED_TO_LIST_MEMBERS
Deprecated.
  1. static
  2. int
FAILED_TO_LIST_NODES
Deprecated.
  1. static
  2. int
FAILED_TO_LIST_SERVERS
Deprecated.
  1. static
  2. int
FAILED_TO_SET_LEVEL
Deprecated.
  1. static
  2. java.util.HashMap
moduleNLSMap
Deprecated.
  1. static
  2. int
NO_COLLECTOR_FOUND
Deprecated.
  1. static
  2. int
NO_ERROR
Deprecated.
  1. static
  2. int
NO_PERFMBEAN_FOUND
Deprecated.
  1. static
  2. int
NO_SUCH_A_NODE
Deprecated.
  1. static
  2. int
NO_SUCH_A_SERVER
Deprecated.
  1. static
  2. com.ibm.ejs.sm.client.ui.NLS
pmiNLS
Deprecated.
  1. static
  2. java.util.HashMap
prefixNLSMap
Deprecated.
  1. static
  2. java.lang.String
SEPERATOR40
Deprecated.
  1. static
  2. java.lang.String
SEPERATOR50
Deprecated.
  1. static
  2. int
SERVER_STOPPED
Deprecated.
  1. static
  2. java.lang.String
VERSION_AE
Deprecated.
  1. static
  2. java.lang.String
VERSION_AES
Deprecated.
  1. static
  2. java.lang.String
VERSION_EPM
Deprecated.
  1. static
  2. java.lang.String
VERSION_WAS50
Deprecated.
  1. static
  2. java.lang.String
VERSION_WAS50ND
Deprecated.
Fields inherited from interface com.ibm.websphere.pmi.PmiConstants
AE_35, AE_40, AES_40, ALL_DATA, APPSERVER_MODULE, BEAN_METHODS_SUBMODULE, BEAN_MODULE, CACHE_MODULE, COLLECTION_DESC, CONNPOOL_MODULE, DEFAULT_MODULE_PREFIX, EJB_ENTITY, EJB_MESSAGEDRIVEN, EJB_SINGLETON, EJB_STATEFUL, EJB_STATELESS, INITIALIZATION_FAILED, INITIALIZING, INTERCEPTOR_SUBMODULE, J2C_CF, J2C_DS, J2C_JMS_CONNECTIONS, J2C_MODULE, JAVA_TIME_CONVERT_RATIO, JVMPI_MODULE, LEVEL_DISABLE, LEVEL_ENABLE, LEVEL_FINEGRAIN, LEVEL_HIGH, LEVEL_HIGH_STRING, LEVEL_LOW, LEVEL_LOW_STRING, LEVEL_MAX, LEVEL_MAX_STRING, LEVEL_MEDIUM, LEVEL_MEDIUM_STRING, LEVEL_NONE, LEVEL_NONE_STRING, LEVEL_UNDEFINED, LOAD_AVG, LOST_CONTACT, METHODS_SUBMODULE_SHORTNAME, MSG_BUNDLE, NOT_IN_SUBMODULE, ORBPERF_MODULE, PLATFORM_ALL, PLATFORM_DISTRIBUTED, PLATFORM_ZOS, PMI_DISABLE_STRING, ROOT_DESC, ROOT_NAME, RUNNING, RUNTIME_MODULE, SERVLET_SUBMODULE, SERVLETS_SUBMODULE_SHORTNAME, SESSIONS_MODULE, STOPPED, SYSTEM_MODULE, TEMPLATE_SUBMODULE, TERMINATING, THREADPOOL_MODULE, TRAN_MODULE, TYPE_AVGSTAT, TYPE_CATEGORY, TYPE_COLLECTION, TYPE_DATA, TYPE_DOUBLE, TYPE_INSTANCE, TYPE_INT, TYPE_INVALID, TYPE_LOAD, TYPE_LONG, TYPE_MODULE, TYPE_MODULEROOT, TYPE_NODE, TYPE_RANGE, TYPE_ROOT, TYPE_SERVER, TYPE_STAT, TYPE_SUBINSTANCE, TYPE_SUBMODULE, TYPE_UNDEFINED, UNINITIALIZED, UNKNOWN_ID, WEBAPP_MODULE, WEBSERVICES_MODULE, WEBSERVICES_SUBMODULE, WLM_CLIENT_MODULE, WLM_MODULE, WLM_SERVER_MODULE, WSGW_MODULE, XML_COLLECTION, XML_COUNT, XML_CREATETIME, XML_DOUBLE, XML_ENDCOLLECTION, XML_ENDLINE, XML_ENDMODULE, XML_ENDNODE, XML_ENDSERVER, XML_ENDTAG, XML_ID, XML_INT, XML_INTEGRAL, XML_LASTVALUE, XML_LOAD, XML_LONG, XML_MODULE, XML_NAME, XML_NODE, XML_QUOTE, XML_SERVER, XML_START, XML_STAT, XML_SUMOFSQUARES, XML_TIME, XML_TOTAL, XML_VALUE, XML_VIEW

Constructor Summary

Constructor and Description
PmiClient()
Deprecated. Constructor: assume all defaults: local host, port DEFAULT_CONNECTOR_PORT, and WAS50 version.
PmiClient(boolean inAppServer)
Deprecated. Use this constructor only when you are calling it inside an appserver.
PmiClient(java.util.Properties props,java.lang.String version)
Deprecated. Constructor: take a Properties and the version.
PmiClient(java.lang.String host,java.lang.String port)
Deprecated. Constructor:
PmiClient(java.lang.String host,java.lang.String port,java.lang.String version)
Deprecated. Constructor: take host, port, and version.
PmiClient(java.lang.String host,java.lang.String port,java.lang.String version,boolean inAppServer,java.lang.String connectorType)
Deprecated. Constructor: take host, port, and version.
PmiClient(java.lang.String host,java.lang.String nodeName,java.lang.String port,java.lang.String version)
Deprecated. Constructor: take host, nodeName, port, and version.

Method Summary

Modifier and Type Method and Description
  1. void
add(PerfDescriptor pd)
Deprecated. 4.0 API.
  1. CpdCollection
createCpdCollection(PerfDescriptor colPd,com.ibm.ws.pmi.wire.WpdCollection wCol)
Deprecated. 4.0 API: create a CpdCollection object from WpdCollection
  1. static
  2. CpdData
createCpdData(PmiModuleConfig moduleConfig,PerfDescriptor parent,com.ibm.ws.pmi.wire.WpdData wData)
Deprecated. 4.0 API: create a CpdData object from WpdData
  1. static
  2. MBeanLevelSpec
createMBeanLevelSpec(javax.management.ObjectName oname,int level)
Deprecated. 5.0 API: Create an MBeanLevelSpec object.
  1. static
  2. MBeanLevelSpec
createMBeanLevelSpec(javax.management.ObjectName oname,StatDescriptor sd,int level)
Deprecated. 5.0 API: Create an MBeanLevelSpec object.
  1. static
  2. PerfDescriptor
createPerfDescriptor()
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(PerfDescriptor parent,int dataId)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(PerfDescriptor parent,int[] dataIds)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(PerfDescriptor parent,java.lang.String name)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String qualifiedDataPath)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String[] dataPath)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String[] dataPath,int dataId)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String[] dataPath,int[] dataIds)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String qualifiedDataPath,int dataId)
Deprecated. 4.0 API.
  1. static
  2. PerfDescriptor
createPerfDescriptor(java.lang.String qualifiedDataPath,int[] dataIds)
Deprecated. 4.0 API.
  1. PerfLevelSpec
createPerfLevelSpec(int level)
Deprecated. 4.0 API.
  1. PerfLevelSpec
createPerfLevelSpec(java.lang.String[] path,int level)
Deprecated. 4.0 API.
  1. static
  2. CpdCollection
createRootCollection()
Deprecated. 4.0 API: Create the root collection for the domain
  1. void
end()
Deprecated. Call this method before and ONLY before you are done with PmiClient
  1. static
  2. PmiModuleConfig
findConfig(PmiModuleConfig[] configs,javax.management.ObjectName on)
Deprecated. Return the config for the MBean ObjectName
  1. static
  2. PmiModuleConfig
findConfig(PmiModuleConfig[] configs,java.lang.String moduleID)
Deprecated. Return the config for the moduleID
  1. CpdCollection
get(PerfDescriptor pd,boolean recursive)
Deprecated. 4.0 API: Get PMI data.
  1. int
getAdminState(java.lang.String nodeName)
Deprecated. Get the administratio state of the node, i.e., start or stop.
  1. int
getAdminState(java.lang.String nodeName,java.lang.String serverName)
Deprecated. Get the administratio state of the server, i.e., start or stop.
  1. PmiModuleConfig
getConfig(java.lang.String moduleName)
Deprecated. Return PmiModuleConfig for the module.
  1. PmiModuleConfig
getConfig(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName)
Deprecated. 5.0 API: Get PmiModuleConfig for a particular MBean.
  1. PmiModuleConfig
getConfig(java.lang.String nodeName,java.lang.String serverName,java.lang.String moduleName)
Deprecated. Get PmiModuleConfig for a particular PMI module.
  1. PmiModuleConfig[]
getConfigs()
Deprecated. Get an array of PmiModuleConfig for all the PMI modules.
  1. PmiModuleConfig[]
getConfigs(java.lang.String nodeName,java.lang.String serverName)
Deprecated. 5.0 API: Get all PmiModuleConfigs for the server.
  1. java.lang.String
getConnectedHost()
Deprecated. Return the connected host name: it should be the name of host name passed to PmiClient or the actual localhost name if "localhost" is passed to PmiClient.
  1. int
getDataId(java.lang.String moduleName,java.lang.String dataName)
Deprecated. Convert data name to dataId
  1. java.lang.String
getDataName(java.lang.String moduleName,int dataId)
Deprecated. Convert data id to data name
  1. int
getErrorCode()
Deprecated. Check the error code, which could be one of the error constants defined in this class.
  1. int
getErrorCode(java.lang.String nodeName)
Deprecated. Check the error code, which could be one of the error constants defined in this class.
  1. java.lang.String
getErrorMessage()
Deprecated. Check the error message.
  1. java.lang.String
getErrorMessage(java.lang.String nodeName)
Deprecated. Check the error message.
  1. PerfLevelSpec[]
getInstrumentationLevel(java.lang.String nodeName,java.lang.String serverName)
Deprecated. 4.0 API.
  1. static
  2. java.lang.String
getNLSValue(java.lang.String key)
Deprecated. Replaced by getNLSValue (key, moduleID)
  1. static
  2. java.lang.String
getNLSValue(java.lang.String key,java.lang.String moduleID)
Deprecated. Get translated key from the resource bundle.
  1. CpdCollection[]
gets(boolean recursive)
Deprecated. Get all the data you requested by calling add method.
  1. CpdCollection[]
gets(PerfDescriptor[] pds,boolean recursive)
Deprecated. 4.0 API.
  1. CpdCollection[]
gets(PerfDescriptorList pdList,boolean recursive)
Deprecated. 4.0 API.
  1. MBeanLevelSpec[]
getStatLevel(java.lang.String nodeName,java.lang.String serverName,MBeanStatDescriptor msd,boolean recursive)
Deprecated. 5.0 API: Get MBeanLevelSpec[] based on a MBeanStatDescriptor.
  1. MBeanLevelSpec[]
getStatLevel(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName,boolean recursive)
Deprecated. 5.0 API: Get MBeanLevelSpec[] based on an ObjectName.
  1. Stats[]
getStats(java.lang.String nodeName,java.lang.String serverName,MBeanStatDescriptor[] msds,boolean recursive)
Deprecated. 5.0 API: Return an array of Stats objects.
  1. Stats
getStats(java.lang.String nodeName,java.lang.String serverName,MBeanStatDescriptor msd,boolean recursive)
Deprecated. 5.0 API: Return a Stats object.
  1. Stats[]
getStats(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName[] oNames,boolean recursive)
Deprecated. 5.0 API: Return an array of Stats objects.
  1. Stats
getStats(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName,boolean recursive)
Deprecated. 5.0 API: Return a Stats object.
  1. javax.management.ObjectName[]
listMBeans(java.lang.String nodeName,java.lang.String serverName)
Deprecated. 5.0 API: List all the MBeans in the server.
  1. PerfDescriptor[]
listMembers(PerfDescriptor pd)
Deprecated. 4.0 API: List all the PMI members (modules, submodules, or data) under the PerfDescriptor.
  1. PerfDescriptor[]
listNodes()
Deprecated. List all the nodes in WebSphere domain.
  1. PerfDescriptor[]
listServers(PerfDescriptor pd)
Deprecated. List all the serves in the node.
  1. PerfDescriptor[]
listServers(java.lang.String nodeName)
Deprecated. List all the servers in the node.
  1. MBeanStatDescriptor[]
listStatMembers(java.lang.String nodeName,java.lang.String serverName,MBeanStatDescriptor msd)
Deprecated. 5.0 API: List the MBeanStatDescriptors (if any) under it.
  1. MBeanStatDescriptor[]
listStatMembers(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName)
Deprecated. 5.0 API: List the MBeanStatDescriptors (if any) under it.
  1. void
refreshModuleConfig(java.lang.String node,java.lang.String server)
Deprecated. Get the module configuration for all the modules from the given node and server
  1. void
setDebug(boolean enableDebug)
Deprecated. Pass true to it to enable debug, which is disabled by default.
  1. void
setInstrumentationLevel(java.lang.String nodeName,java.lang.String serverName,PerfLevelSpec[] specs,boolean recursive)
Deprecated. 4.0 API.
  1. void
setPerfConfigInfo(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName,StatDescriptor sd,Stats stats)
Deprecated.
  1. void
setPerfConfigInfo(java.lang.String nodeName,java.lang.String serverName,javax.management.ObjectName oName,Stats stats)
Deprecated. 5.0 API: Set performance config info for each stats.
  1. void
setStatLevel(java.lang.String nodeName,java.lang.String serverName,MBeanLevelSpec[] msds,boolean recursive)
Deprecated. 5.0 API: Set level.
  1. void
setStatLevel(java.lang.String nodeName,java.lang.String serverName,MBeanLevelSpec mls,boolean recursive)
Deprecated. 5.0 API: Set level.
  1. static
  2. java.lang.String[]
stringToArray(java.lang.String qualifiedName)
Deprecated. 4.0 API.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
Deprecated.
See Also:

VERSION_AE

  1. public static final java.lang.String VERSION_AE
Deprecated.
See Also:

VERSION_AES

  1. public static final java.lang.String VERSION_AES
Deprecated.
See Also:

VERSION_EPM

  1. public static final java.lang.String VERSION_EPM
Deprecated.
See Also:

VERSION_WAS50

  1. public static final java.lang.String VERSION_WAS50
Deprecated.
See Also:

VERSION_WAS50ND

  1. public static final java.lang.String VERSION_WAS50ND
Deprecated.
See Also:

NO_ERROR

  1. public static final int NO_ERROR
Deprecated.
See Also:

FAILED_TO_GET_INITIAL_CONTEXT

  1. public static final int FAILED_TO_GET_INITIAL_CONTEXT
Deprecated.
See Also:

FAILED_TO_CREATE_PMISERVICE_BEAN_OBJECT

  1. public static final int FAILED_TO_CREATE_PMISERVICE_BEAN_OBJECT
Deprecated.
See Also:

FAILED_TO_LIST_NODES

  1. public static final int FAILED_TO_LIST_NODES
Deprecated.
See Also:

FAILED_TO_LIST_SERVERS

  1. public static final int FAILED_TO_LIST_SERVERS
Deprecated.
See Also:

FAILED_TO_LIST_MEMBERS

  1. public static final int FAILED_TO_LIST_MEMBERS
Deprecated.
See Also:

FAILED_TO_ENABLE_DATA

  1. public static final int FAILED_TO_ENABLE_DATA
Deprecated.
See Also:

FAILED_TO_DISABLE_DATA

  1. public static final int FAILED_TO_DISABLE_DATA
Deprecated.
See Also:

FAILED_TO_SET_LEVEL

  1. public static final int FAILED_TO_SET_LEVEL
Deprecated.
See Also:

FAILED_TO_GET_LEVEL

  1. public static final int FAILED_TO_GET_LEVEL
Deprecated.
See Also:

FAILED_TO_GET_DATA

  1. public static final int FAILED_TO_GET_DATA
Deprecated.
See Also:

FAILED_TO_GET_ADMIN_STATE

  1. public static final int FAILED_TO_GET_ADMIN_STATE
Deprecated.
See Also:

SERVER_STOPPED

  1. public static final int SERVER_STOPPED
Deprecated.
See Also:

NO_COLLECTOR_FOUND

  1. public static final int NO_COLLECTOR_FOUND
Deprecated.
See Also:

NO_SUCH_A_NODE

  1. public static final int NO_SUCH_A_NODE
Deprecated.
See Also:

NO_SUCH_A_SERVER

  1. public static final int NO_SUCH_A_SERVER
Deprecated.
See Also:

NO_PERFMBEAN_FOUND

  1. public static final int NO_PERFMBEAN_FOUND
Deprecated.
See Also:

SEPERATOR50

  1. public static final java.lang.String SEPERATOR50
Deprecated.
See Also:

SEPERATOR40

  1. public static final java.lang.String SEPERATOR40
Deprecated.
See Also:

DEFAULT_CONNECTOR_TYPE

  1. public static final java.lang.String DEFAULT_CONNECTOR_TYPE
Deprecated.
See Also:

DEFAULT_CONNECTOR_PORT

  1. public static final java.lang.String DEFAULT_CONNECTOR_PORT
Deprecated.
See Also:

pmiNLS

  1. public static final com.ibm.ejs.sm.client.ui.NLS pmiNLS
Deprecated.

moduleNLSMap

  1. public static java.util.HashMap moduleNLSMap
Deprecated.

prefixNLSMap

  1. public static java.util.HashMap prefixNLSMap
Deprecated.

Constructor Detail

PmiClient

  1. public PmiClient()
  2. throws java.rmi.RemoteException
Deprecated.
Constructor: assume all defaults: local host, port DEFAULT_CONNECTOR_PORT, and WAS50 version.
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(boolean inAppServer)
  2. throws java.rmi.RemoteException
Deprecated.
Use this constructor only when you are calling it inside an appserver.
Parameters:
inAppServer - may be true if you are calling it inside an appserver
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(java.lang.String host,
  2. java.lang.String port)
  3. throws java.rmi.RemoteException
Deprecated.
Constructor:
Parameters:
host - is the host name where adminserver/netManager is running
port - is the port number for adminserver/netManager Use default version, i.e., WAS50.
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(java.lang.String host,
  2. java.lang.String port,
  3. java.lang.String version)
  4. throws java.rmi.RemoteException
Deprecated.
Constructor: take host, port, and version.
Parameters:
host - is the host name where adminserver/netManager is running
port - is the port number for adminserver/netManager
version - could be "WAS50" for 5.0, "AE" for 4.0x AE, "AES" for 4.0x AEs, and "EPM" for 3.5
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(java.lang.String host,
  2. java.lang.String nodeName,
  3. java.lang.String port,
  4. java.lang.String version)
  5. throws java.rmi.RemoteException
Deprecated.
Constructor: take host, nodeName, port, and version. Only applicable to 3.5.x server.
Parameters:
host - is the host name where adminserver/netManager is running
port - is the port number for adminserver/netManager
version - could be "WAS50" for 5.0, "AE" for 4.0x AE, "AES" for 4.0x AEs, and "EPM" for 3.5
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(java.lang.String host,
  2. java.lang.String port,
  3. java.lang.String version,
  4. boolean inAppServer,
  5. java.lang.String connectorType)
  6. throws java.rmi.RemoteException
Deprecated.
Constructor: take host, port, and version.
Parameters:
host - is the host name where adminserver/netManager is running. If not passed, the default is localhost.
port - is the port number for adminserver/netManager. If not passed, the default is DEFAULT_CONNECTOR_PORT.
version - could be "WAS50" for 5.0, "AE" for 4.0x and "EPM" for 3.5. If not passed, the default is WAS50.
inAppServer - should be false unless you are calling from an appserver. If not passed, the default is false.
connectorType - is either RMI or SOAP. If not passed, the default is DEFAULT_CONNECTOR_TYPE.
Throws:
java.rmi.RemoteException

PmiClient

  1. public PmiClient(java.util.Properties props,
  2. java.lang.String version)
  3. throws java.rmi.RemoteException
Deprecated.
Constructor: take a Properties and the version. This is a generic way to pass all the necessary paramter.

If you do not use the default host (localhost), port (8880) and connector type (AdminClient.CONNECTOR_TYPE_SOAP), you have to set the following properties props.setProperty(AdminClient.CONNECTOR_HOST, hostName); props.setProperty(AdminClient.CONNECTOR_PORT, portNumber); props.setProperty(AdminClient.CONNECTOR_TYPE, connectorType);

Enable security for WAS 5.0. The following instruction is copied from AdminClient.

For SOAP based AdminClient, the users need to specifiy the "username" and "password" and explicitly set "securityEnabled" as "true". Some other properties are also required in order to make a SSL connection, these properties can be either specified as a Java system properties or passed as paramemters when invoking AdminClientFactory.createAdminClient(Properties). These properties include

  • javax.net.ssl.trustStore
  • javax.net.ssl.keyStore
  • javax.net.ssl.trustStorePassword
  • javax.net.ssl.keyStorePassword
The javax.net.ssl.trustStore and javax.net.ssl.keyStore are mandatory, the passwords for these two stores are required only when the stores are key protected.

An exmample to make a secure SOAP based AdminClient:


        Properties props = new Properties();            
        props.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
        props.setProperty(AdminClient.CONNECTOR_PORT, "8880");
        props.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_SOAP);
        props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
        props.setProperty(AdminClient.USERNAME, "user1");
        props.setProperty(AdminClient.PASSWORD, "password1");
        props.setProperty("javax.net.ssl.trustStore", "C:/WebSphere/AppServer/etc/DummyClientTrustFile.jks");
                props.setProperty("javax.net.ssl.keyStore", "C:/WebSphere/AppServer/etc/DummyClientKeyFile.jks");
                props.setProperty("javax.net.ssl.trustStorePassword", "WebAS");
                props.setProperty("javax.net.ssl.keyStorePassword", "WebAS");
        AdminClient client = AdminClientFactory.createAdminClient(props);
 
 

To make a secure RMI based AdminClient is a little easier because you can rely on existing "com.ibm.CORBA.ConfigURL" which normal points to a property file, for instance, $WAS_ROOT/properties/sas.client.properites. There are a couple different ways to specify the login username and password and it's determined by "com.ibm.CORBA.loginSource" in "com.ibm.CORBA.ConfigURL". For programmatic login, you can set "com.ibm.CORBA.loginSource" as "none" and then provide your username/password when you create a AdminClient using AdminClientFactory.

For example,

      Properties props = new Properties();
        props.setProperty(AdminClient.CONNECTOR_HOST, "localhost");
        props.setProperty(AdminClient.CONNECTOR_PORT, "2809");
        props.setProperty(AdminClient.CONNECTOR_TYPE, AdminClient.CONNECTOR_TYPE_RMI);
        props.setProperty(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
        props.setProperty(AdminClient.USERNAME, "test");
        props.setProperty(AdminClient.PASSWORD, "user4test");
                AdminClient client = AdminClientFactory.createAdminClient(props);
 
 
Throws:
java.rmi.RemoteException

Method Detail

getConnectedHost

  1. public java.lang.String getConnectedHost( )
Deprecated.
Return the connected host name: it should be the name of host name passed to PmiClient or the actual localhost name if "localhost" is passed to PmiClient. Note: you can pass "localhost" when calling "new PmiClient", but you cannot use "localhost" when calling methods on PmiClient. You have to call this method to get the real host name and pass as parameter to methods in PmiClient.

createCpdData

  1. public static CpdData createCpdData( PmiModuleConfig moduleConfig,
  2. PerfDescriptor parent,
  3. com.ibm.ws.pmi.wire.WpdData wData)
Deprecated.
4.0 API: create a CpdData object from WpdData

createCpdCollection

  1. public CpdCollection createCpdCollection( PerfDescriptor colPd,
  2. com.ibm.ws.pmi.wire.WpdCollection wCol)
Deprecated.
4.0 API: create a CpdCollection object from WpdCollection

createRootCollection

  1. public static CpdCollection createRootCollection( )
Deprecated.
4.0 API: Create the root collection for the domain

listNodes

  1. public PerfDescriptor[] listNodes( )
  2. throws PmiException
Deprecated.
List all the nodes in WebSphere domain. You can call PerfDescriptor[i].getName() to get a list of node names in WebSphere domain.
Throws:

listServers

  1. public PerfDescriptor[] listServers( java.lang.String nodeName)
  2. throws PmiException
Deprecated.
List all the servers in the node. You can call PerfDescriptor[i].getName() to get a list of server names on the node.
Throws:

listServers

  1. public PerfDescriptor[] listServers( PerfDescriptor pd)
  2. throws PmiException
Deprecated.
List all the serves in the node. You can call PerfDescriptor[i].getName() to get a list of server names on the node.
Throws:

listMembers

  1. public PerfDescriptor[] listMembers( PerfDescriptor pd)
  2. throws PmiException
Deprecated.
4.0 API: List all the PMI members (modules, submodules, or data) under the PerfDescriptor.
Throws:

getConfigs

  1. public PmiModuleConfig[] getConfigs( )
Deprecated.
Get an array of PmiModuleConfig for all the PMI modules. It may contain all the modules avaialbe in WebSphere app server. A specific appserver may or may not use all of the them.

refreshModuleConfig

  1. public void refreshModuleConfig( java.lang.String node,
  2. java.lang.String server)
Deprecated.
Get the module configuration for all the modules from the given node and server

getConfig

  1. public PmiModuleConfig getConfig( java.lang.String moduleName)
Deprecated.
Return PmiModuleConfig for the module.

get

  1. public CpdCollection get(PerfDescriptor pd,
  2. boolean recursive)
  3. throws PmiException
Deprecated.
4.0 API: Get PMI data. The PerfDescriptor uniquely identifies the PMI data in an appserver. It will return null if pd is wrong or server is down.
Parameters:
recursive - If recursive is true, it will return all the subcollections with data. If recursive is false, it will return the data immediately under the PerfDescriptor and no subcollection will be returned.
Throws:

gets

  1. public CpdCollection[] gets(boolean recursive)
  2. throws PmiException
Deprecated.
Get all the data you requested by calling add method.
Throws:

gets

  1. public CpdCollection[] gets(PerfDescriptor[] pds,
  2. boolean recursive)
  3. throws PmiException
Deprecated.
4.0 API. Get PMI data. Each pd uniquely identifies the PMI data in an appserver.
Parameters:
recursive - If recursive is true, it will return all the subcollections with data. If recursive is false, it will return the data immediately under the PerfDescriptor and no subcollection will be returned.
Throws:

gets

  1. public CpdCollection[] gets(PerfDescriptorList pdList,
  2. boolean recursive)
  3. throws PmiException
Deprecated.
4.0 API. Get PMI data. Each pd uniquely identifies the PMI data in an appserver.
Parameters:
recursive - If recursive is true, it will return all the subcollections with data. If recursive is false, it will return the data immediately under the PerfDescriptor and no subcollection will be returned.
Throws:

getAdminState

  1. public int getAdminState(java.lang.String nodeName)
  2. throws PmiException
Deprecated.
Get the administratio state of the node, i.e., start or stop.
Throws:

getAdminState

  1. public int getAdminState(java.lang.String nodeName,
  2. java.lang.String serverName)
  3. throws PmiException
Deprecated.
Get the administratio state of the server, i.e., start or stop.
Throws:

getErrorCode

  1. public int getErrorCode()
Deprecated.
Check the error code, which could be one of the error constants defined in this class. You may want to call it when you think the return result is not expected.

getErrorMessage

  1. public java.lang.String getErrorMessage( )
Deprecated.
Check the error message. You may want to call it when you think the return result is not expected.

getErrorCode

  1. public int getErrorCode(java.lang.String nodeName)
Deprecated.
Check the error code, which could be one of the error constants defined in this class. You may want to call it when you think the return result is not expected.

getErrorMessage

  1. public java.lang.String getErrorMessage( java.lang.String nodeName)
Deprecated.
Check the error message. You may want to call it when you think the return result is not expected.

add

  1. public void add(PerfDescriptor pd)
Deprecated.
4.0 API. Add pd to the PmiClient and later call gets(boolean recursive) to retrieve data for all the pds you have added.

stringToArray

  1. public static java.lang.String[] stringToArray( java.lang.String qualifiedName)
Deprecated.
4.0 API. A help method.
Parameters:
qualifiedName - it should look like the following: nodename,servername,modulename,instancename

The qualifierName can also be nodename/servername/modulename/instancename as supported in 4.0. However, "/" can not be in any name in the path if you use the 4.0 format. Otherwise, PMI will not be able to construct path correctly. You can use a substring of the above starting from node name


createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( )
Deprecated.
4.0 API. Return a PerfDescriptor especially for the root in the domain. Take no param.

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String[] dataPath)
Deprecated.
4.0 API. Return a PerfDescriptor with given dataPath

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String qualifiedDataPath)
Deprecated.
4.0 API.
Parameters:
qualifiedDataPath - it should look like the following: nodename/servername/modulename/instancename. e.g. node1/server1/connectionPoolModule/datasource1 node1/server1/beanModule/container1.bean1

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String[] dataPath,
  2. int dataId)
Deprecated.
4.0 API. Return a PerfDescriptor with given dataPath and single dataId

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String qualifiedDataPath,
  2. int dataId)
Deprecated.
4.0 API.
Parameters:
qualifiedDataPath - it should look like the following: nodename/servername/modulename/instancename. e.g. node1/server1/connectionPoolModule/datasource1 node1/server1/beanModule/container1.bean1

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String[] dataPath,
  2. int[] dataIds)
Deprecated.
4.0 API. Return a PerfDescriptor with given dataPath and multiple dataIds under same dataPath.

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( java.lang.String qualifiedDataPath,
  2. int[] dataIds)
Deprecated.
4.0 API.
Parameters:
qualifiedDataPath - it should look like the following: nodename/servername/modulename/instancename. e.g. node1/server1/connectionPoolModule/datasource1 node1/server1/beanModule/container1.bean1

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( PerfDescriptor parent,
  2. java.lang.String name)
Deprecated.
4.0 API. Return a PerfDescriptor with the given parent.

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( PerfDescriptor parent,
  2. int dataId)
Deprecated.
4.0 API. Return a PerfDescriptor with given dataPath and single dataId

createPerfDescriptor

  1. public static PerfDescriptor createPerfDescriptor( PerfDescriptor parent,
  2. int[] dataIds)
Deprecated.
4.0 API. Return a PerfDescriptor with given dataPath and multiple dataIds under same dataPath.

createPerfLevelSpec

  1. public PerfLevelSpec createPerfLevelSpec( java.lang.String[] path,
  2. int level)
Deprecated.
4.0 API. Return a PerfLevelSpec with given path and level

createPerfLevelSpec

  1. public PerfLevelSpec createPerfLevelSpec( int level)
Deprecated.
4.0 API. Return a PerfLevelSpec - no path means for all the paths in the app server

getDataName

  1. public java.lang.String getDataName( java.lang.String moduleName,
  2. int dataId)
Deprecated.
Convert data id to data name

getDataId

  1. public int getDataId(java.lang.String moduleName,
  2. java.lang.String dataName)
Deprecated.
Convert data name to dataId

getInstrumentationLevel

  1. public PerfLevelSpec[] getInstrumentationLevel( java.lang.String nodeName,
  2. java.lang.String serverName)
  3. throws PmiException
Deprecated.
4.0 API. Get instrumentation level for all the modules/submodules in the appserver.
Throws:

setInstrumentationLevel

  1. public void setInstrumentationLevel( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. PerfLevelSpec[] specs,
  4. boolean recursive)
  5. throws PmiException
Deprecated.
4.0 API.

Note: setting levels from PmiClient will change the levels in the affected app server. It will impact other PMI clients that retrieve PMI data from the same app server.

Throws:

setPerfConfigInfo

  1. public void setPerfConfigInfo(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName,
  4. Stats stats)
Deprecated.
5.0 API: Set performance config info for each stats. Note the config info not passed by server in order to reduce communication cost.

setPerfConfigInfo

  1. public void setPerfConfigInfo(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName,
  4. StatDescriptor sd,
  5. Stats stats)
Deprecated.

getStats

  1. public Stats getStats(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName,
  4. boolean recursive)
  5. throws PmiException
Deprecated.
5.0 API: Return a Stats object.
Throws:

getStats

  1. public Stats getStats(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanStatDescriptor msd,
  4. boolean recursive)
  5. throws PmiException
Deprecated.
5.0 API: Return a Stats object.
Throws:

getStats

  1. public Stats[] getStats(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName[] oNames,
  4. boolean recursive)
  5. throws PmiException
Deprecated.
5.0 API: Return an array of Stats objects.
Throws:

getStats

  1. public Stats[] getStats(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanStatDescriptor[] msds,
  4. boolean recursive)
  5. throws PmiException
Deprecated.
5.0 API: Return an array of Stats objects.
Throws:

listMBeans

  1. public javax.management.ObjectName[] listMBeans( java.lang.String nodeName,
  2. java.lang.String serverName)
Deprecated.
5.0 API: List all the MBeans in the server.

listStatMembers

  1. public MBeanStatDescriptor[] listStatMembers( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName)
Deprecated.
5.0 API: List the MBeanStatDescriptors (if any) under it.

listStatMembers

  1. public MBeanStatDescriptor[] listStatMembers( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanStatDescriptor msd)
Deprecated.
5.0 API: List the MBeanStatDescriptors (if any) under it.

getConfigs

  1. public PmiModuleConfig[] getConfigs( java.lang.String nodeName,
  2. java.lang.String serverName)
Deprecated.
5.0 API: Get all PmiModuleConfigs for the server.

getConfig

  1. public PmiModuleConfig getConfig( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName)
Deprecated.
5.0 API: Get PmiModuleConfig for a particular MBean.

getConfig

  1. public PmiModuleConfig getConfig( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. java.lang.String moduleName)
Deprecated.
Get PmiModuleConfig for a particular PMI module.

setStatLevel

  1. public void setStatLevel(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanLevelSpec mls,
  4. boolean recursive)
Deprecated.
5.0 API: Set level. It will enable/disable PMI data in the server.

setStatLevel

  1. public void setStatLevel(java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanLevelSpec[] msds,
  4. boolean recursive)
Deprecated.
5.0 API: Set level. It will enable/disable PMI data in the server.

getStatLevel

  1. public MBeanLevelSpec[] getStatLevel( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. javax.management.ObjectName oName,
  4. boolean recursive)
Deprecated.
5.0 API: Get MBeanLevelSpec[] based on an ObjectName.

getStatLevel

  1. public MBeanLevelSpec[] getStatLevel( java.lang.String nodeName,
  2. java.lang.String serverName,
  3. MBeanStatDescriptor msd,
  4. boolean recursive)
Deprecated.
5.0 API: Get MBeanLevelSpec[] based on a MBeanStatDescriptor.

createMBeanLevelSpec

  1. public static MBeanLevelSpec createMBeanLevelSpec( javax.management.ObjectName oname,
  2. int level)
Deprecated.
5.0 API: Create an MBeanLevelSpec object.

createMBeanLevelSpec

  1. public static MBeanLevelSpec createMBeanLevelSpec( javax.management.ObjectName oname,
  2. StatDescriptor sd,
  3. int level)
Deprecated.
5.0 API: Create an MBeanLevelSpec object.

end

  1. public void end()
Deprecated.
Call this method before and ONLY before you are done with PmiClient

getNLSValue

  1. public static java.lang.String getNLSValue( java.lang.String key)
Deprecated. Replaced by getNLSValue (key, moduleID)
Translate the key to the language you choose. Returns the key if ResourceBundle is missing.

getNLSValue

  1. public static java.lang.String getNLSValue( java.lang.String key,
  2. java.lang.String moduleID)
Deprecated.
Get translated key from the resource bundle.
Parameters:
key - key to be translated
moduleID - the module name from the PmiModuleConfig. Pass null to use default resource bundle
Returns:
Returns translated key or the key if resoure bundle is not available.

setDebug

  1. public void setDebug(boolean enableDebug)
Deprecated.
Pass true to it to enable debug, which is disabled by default.

findConfig

  1. public static PmiModuleConfig findConfig( PmiModuleConfig[] configs,
  2. java.lang.String moduleID)
Deprecated.
Return the config for the moduleID

findConfig

  1. public static PmiModuleConfig findConfig( PmiModuleConfig[] configs,
  2. javax.management.ObjectName on)
Deprecated.
Return the config for the MBean ObjectName