Package com.ibm.di.api.jmx
Class JMXAgent
- java.lang.Object
-
- com.ibm.di.api.jmx.JMXAgent
-
public class JMXAgent extends java.lang.ObjectClass used to to expose all Server API calls through a JMX interface locally and remotely.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONN_JNDI_PATHA path to the connector in the JNDI path.static java.lang.StringMBEAN_SERVER_DOMAINThe name of the server domain.
-
Constructor Summary
Constructors Constructor Description JMXAgent()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.management.MBeanServergetMBeanServer()Returns the created MBean server.static SecurityRegistrygetSecRegistry()Returns the security register of the local session.static voidinitialize()Initializes the JMX layer of the Server API.static voidinitializeRemote()Initializes the remotely exposed JMX layer of the Server API.static javax.management.ObjectNameregisterMBean(BaseAdmin aBaseAdmin)Registers a pre-existing object as an MBean with the MBean server.static voidunregisterMBean(javax.management.ObjectName aObjectName)Unregisters an MBean from the MBean server.
-
-
-
Field Detail
-
MBEAN_SERVER_DOMAIN
public static final java.lang.String MBEAN_SERVER_DOMAIN
The name of the server domain.- See Also:
- Constant Field Values
-
CONN_JNDI_PATH
public static final java.lang.String CONN_JNDI_PATH
A path to the connector in the JNDI path.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public static void initialize() throws DIExceptionInitializes the JMX layer of the Server API. This method creates MBean server and registers as mbeans the system log, security register, system queue, tombstone manager etc.- Throws:
DIException- if theJMXAgentis already initialized.
-
initializeRemote
public static void initializeRemote() throws DIExceptionInitializes the remotely exposed JMX layer of the Server API. This method creates and starts the RMIConnectorServer.- Throws:
DIException- if theJMXAgentis not initialized.
-
registerMBean
public static javax.management.ObjectName registerMBean(BaseAdmin aBaseAdmin) throws javax.management.JMException, DIException
Registers a pre-existing object as an MBean with the MBean server. This method creates the object name which is passed with theaBaseAdminparameter to thejavax.management.MBeanServer.registerMBean(Object, ObjectName)method.- Parameters:
aBaseAdmin- The MBean to be registered as an MBean.- Returns:
- an
ObjectNameof the newly registered MBean. - Throws:
javax.management.JMException-- if the MBean is already under the control of the MBean server.
- if the
preRegister(MBeanRegistrationinterface) method of the MBean has thrown an exception. The MBean will not be registered.- if
aBaseAdminis not a JMX compliant MBean.- if
aBaseAdminpassed in parameter is null or no object name is specified.DIException- if theJMXAgentis not initialized.
-
unregisterMBean
public static void unregisterMBean(javax.management.ObjectName aObjectName) throws javax.management.JMException, DIExceptionUnregisters an MBean from the MBean server. The MBean is identified by its object name. Once the method has been invoked, the MBean may no longer be accessed by its object name.- Parameters:
aObjectName- The object name of the MBean to be unregistered.- Throws:
javax.management.JMException-- if the MBean specified is not registered in the MBean server.
- if the preDeregister ((
MBeanRegistrationinterface) method of the MBean has thrown an exception.- if
aObjectNamein parameter is null or the MBean you are when trying to unregister is theMBeanServerDelegateMBean.DIException- if theJMXAgentis not initialized.
-
getSecRegistry
public static SecurityRegistry getSecRegistry() throws DIException
Returns the security register of the local session.- Returns:
- the security register
- Throws:
DIException- if theJMXAgentis not initialized.
-
getMBeanServer
public static javax.management.MBeanServer getMBeanServer() throws DIExceptionReturns the created MBean server.- Returns:
- the created MBean server
- Throws:
DIException- if theJMXAgentis not initialized.
-
-