|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmx4odp.j4oNet.MBeanServerManager
public class MBeanServerManager
This is a convience class. It creates an instance of the MBeanServer via a call to MBeanServerFactory.createMBeanServer(), but it keeps a static refernce to the agentId, so you can call this class to get the instance of the MBeanServer that it created.
| Constructor Summary | |
|---|---|
MBeanServerManager()
Creates a new instance of MBeanServerManager |
|
| Method Summary | |
|---|---|
java.lang.String |
getDefaultDomain()
|
javax.management.MBeanServer |
getLocalMBeanServer()
The same as calling getLocalMBeanServer(false); |
javax.management.MBeanServer |
getLocalMBeanServer(boolean create)
This will return the MBeanServer created by this class. |
javax.management.ObjectInstance |
registerObjectToLocalAgent(java.lang.Object object,
boolean useHashInName)
This is a convience method. |
javax.management.ObjectInstance |
registerObjectToLocalAgent(java.lang.Object object,
java.lang.String objectName)
This is a convience method. |
void |
releaseMBeanServer()
removes the reference to the MBeanServer from the factory and blanks out the agentId. |
void |
setDefaultDomain(java.lang.String s)
Whenever this object creates a mbean to manage, it will use this JMX Domain by default. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MBeanServerManager()
| Method Detail |
|---|
public javax.management.ObjectInstance registerObjectToLocalAgent(java.lang.Object object,
boolean useHashInName)
throws javax.management.MBeanException,
javax.management.modelmbean.InvalidTargetObjectTypeException,
javax.management.InstanceNotFoundException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.NotCompliantMBeanException,
javax.management.RuntimeOperationsException,
javax.management.MalformedObjectNameException
object, - the object to wrap in a proxy ModelMBean and registeruseHashInName, - append the instance ID. Or just name it after the class itself.
javax.management.MBeanException - if the Object cannot be introspected for a proxy ModelMBean
javax.management.InstanceAlreadyExistsException - if there already is an MBean of this ObjectName
javax.management.MBeanRegistrationException - wraps exceptions thrown by the preRegister(), preDeregister() methods of the MBeanRegistration interface.
javax.management.NotCompliantMBeanException - occurs when trying to register an object in the MBean server that is not a JMX compliant MBean.
javax.management.RuntimeOperationsException - thrown in the agent when performing operations on MBeans. It wraps the actual java.lang.RuntimeException thrown.
javax.management.MalformedObjectNameException - This should not be thrown, as this method guantees a good name.
javax.management.modelmbean.InvalidTargetObjectTypeException
javax.management.InstanceNotFoundException
public javax.management.ObjectInstance registerObjectToLocalAgent(java.lang.Object object,
java.lang.String objectName)
throws javax.management.MBeanException,
javax.management.modelmbean.InvalidTargetObjectTypeException,
javax.management.InstanceNotFoundException,
javax.management.InstanceAlreadyExistsException,
javax.management.MBeanRegistrationException,
javax.management.NotCompliantMBeanException,
javax.management.RuntimeOperationsException,
javax.management.MalformedObjectNameException
object, - the object to wrap in a proxy ModelMBean and registerobjectName, - the object name to register the object with.
javax.management.MBeanException - if the Object cannot be introspected for a proxy ModelMBean
javax.management.InstanceAlreadyExistsException - if there already is an MBean of this ObjectName
javax.management.MBeanRegistrationException - wraps exceptions thrown by the preRegister(), preDeregister() methods of the MBeanRegistration interface.
javax.management.NotCompliantMBeanException - occurs when trying to register an object in the MBean server that is not a JMX compliant MBean.
javax.management.RuntimeOperationsException - thrown in the agent when performing operations on MBeans. It wraps the actual java.lang.RuntimeException thrown.
javax.management.MalformedObjectNameException - if the format of the objectName string does not correspond to a valid ObjectName
javax.management.modelmbean.InvalidTargetObjectTypeException
javax.management.InstanceNotFoundExceptionpublic javax.management.MBeanServer getLocalMBeanServer()
public javax.management.MBeanServer getLocalMBeanServer(boolean create)
public void releaseMBeanServer()
throws java.lang.Exception
java.lang.Exceptionpublic void setDefaultDomain(java.lang.String s)
public java.lang.String getDefaultDomain()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||