org.apache.qpid.management.domain.model
Class JmxService

java.lang.Object
  extended by org.apache.qpid.management.domain.model.JmxService

public class JmxService
extends Object

A simple facade used to perform operations on Mbean server.


Field Summary
(package private)  MBeanServer _mxServer
           
 
Constructor Summary
JmxService()
           
 
Method Summary
(package private)  ObjectName createClassDefinitionSearchName()
          Creates an object name that will be used for searching all registered events.
(package private)  ObjectName createEntityDefinitionName(String packageName, String className, String type)
           
(package private)  ObjectName createEventSearchName()
          Creates an object name that will be used for searching all registered events.
(package private)  Set<ObjectName> getEventMBeans()
           
 void registerEntityDefinition(ObjectName name, QpidEntity entity, String packageName, String className)
           
(package private)  ObjectName registerEventInstance(QpidEvent.QManManagedEvent eventInstance, UUID brokerId, String packageName, String eventClassName)
          Registers an event instance with MBean server.
(package private)  ObjectName registerObjectInstance(QpidClass.QManManagedObject instance, UUID brokerId, String packageName, String className, Binary objectId)
          Registers a pre-existing object instance as an MBean with the MBean server.
 void registerQManService(QMan qman)
          Registers QMan with the MBeanServer.
 void unregisterClassDefinitions()
           
(package private)  void unregisterEvents()
          Removes (unregister) all events from MBean Server.
(package private)  ObjectName unregisterObjectInstance(UUID brokerId, String packageName, String className, Binary objectId)
          Removes / unregisters a managed object instance from the MBean Server.
(package private)  void unregisterObjectInstances()
          Removes (unregister) all object instances from MBean Server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mxServer

MBeanServer _mxServer
Constructor Detail

JmxService

public JmxService()
Method Detail

registerQManService

public void registerQManService(QMan qman)
                         throws MBeanException
Registers QMan with the MBeanServer. After that QMan management interface will be JMX-exposed.

Parameters:
qman - QMan
Throws:
MBeanException - when some error occurs during registration.

registerEventInstance

ObjectName registerEventInstance(QpidEvent.QManManagedEvent eventInstance,
                                 UUID brokerId,
                                 String packageName,
                                 String eventClassName)
Registers an event instance with MBean server.

Parameters:
eventInstance - the mben event instance
brokerId - the broker identifier.
packageName - the package name.
eventClassName - the event class name.
Returns:
the object name used for registration.

registerObjectInstance

ObjectName registerObjectInstance(QpidClass.QManManagedObject instance,
                                  UUID brokerId,
                                  String packageName,
                                  String className,
                                  Binary objectId)
Registers a pre-existing object instance as an MBean with the MBean server.

Parameters:
instance - the object instance.
brokerId - the broker identifier.
packageName - the name of the package containing this instance.
className - the name of the owner class of this instance.
objectId - the object instance identifier.
Returns:
the object name used for registration.

unregisterObjectInstance

ObjectName unregisterObjectInstance(UUID brokerId,
                                    String packageName,
                                    String className,
                                    Binary objectId)
Removes / unregisters a managed object instance from the MBean Server.

Parameters:
brokerId - the broker identifier.
packageName - the name of the package containing this instance.
className - the name of the owner class of this instance.
objectId - the object instance identifier.
Returns:
obejctName the obejct name used for deregistration.

unregisterEvents

void unregisterEvents()
Removes (unregister) all events from MBean Server.


getEventMBeans

Set<ObjectName> getEventMBeans()

unregisterObjectInstances

void unregisterObjectInstances()
Removes (unregister) all object instances from MBean Server.


createEventSearchName

ObjectName createEventSearchName()
Creates an object name that will be used for searching all registered events.

Returns:
the object name that will be used for searching all registered events.

createClassDefinitionSearchName

ObjectName createClassDefinitionSearchName()
Creates an object name that will be used for searching all registered events.

Returns:
the object name that will be used for searching all registered events.

createEntityDefinitionName

ObjectName createEntityDefinitionName(String packageName,
                                      String className,
                                      String type)

registerEntityDefinition

public void registerEntityDefinition(ObjectName name,
                                     QpidEntity entity,
                                     String packageName,
                                     String className)

unregisterClassDefinitions

public void unregisterClassDefinitions()


Licensed to the Apache Software Foundation