org.apache.felix.ipojo.handlers.jmx
Class DynamicMBeanWRegisterImpl

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.apache.felix.ipojo.handlers.jmx.DynamicMBeanImpl
          extended by org.apache.felix.ipojo.handlers.jmx.DynamicMBeanWRegisterImpl
All Implemented Interfaces:
javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

public class DynamicMBeanWRegisterImpl
extends DynamicMBeanImpl
implements javax.management.MBeanRegistration

This class implements a 'wide' iPOJO DynamicMBean that can perform actions before and after its registration and deregistration.

Author:
Felix Project Team

Field Summary
 
Fields inherited from class org.apache.felix.ipojo.handlers.jmx.DynamicMBeanImpl
m_instanceManager
 
Constructor Summary
DynamicMBeanWRegisterImpl(JmxConfigFieldMap properties, InstanceManager instanceManager, MethodMetadata preRegisterMeth, MethodMetadata postRegisterMeth, MethodMetadata preDeregisterMeth, MethodMetadata postDeregisterMeth)
          Constructs a new DynamicMBeanWRegisterImpl.
 
Method Summary
 javax.management.ObjectName getObjectName()
          Returns the MBean name used to register it.
 void postDeregister()
          This method is executed after the MBean deregistration.
 void postRegister(Boolean registrationDone)
          This method is executed after the MBean registration.
 void preDeregister()
          This method is before after the MBean deregistration.
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
          This method is executed before the MBean registration.
 
Methods inherited from class org.apache.felix.ipojo.handlers.jmx.DynamicMBeanImpl
getAttribute, getAttributes, getMBeanInfo, getNotificationInfo, invoke, sendNotification, setAttribute, setAttributes
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMBeanWRegisterImpl

public DynamicMBeanWRegisterImpl(JmxConfigFieldMap properties,
                                 InstanceManager instanceManager,
                                 MethodMetadata preRegisterMeth,
                                 MethodMetadata postRegisterMeth,
                                 MethodMetadata preDeregisterMeth,
                                 MethodMetadata postDeregisterMeth)
Constructs a new DynamicMBeanWRegisterImpl.

Parameters:
properties - the data extracted from the metadata.xml
instanceManager - the instance manager
preRegisterMeth - the method to call before MBean registration
postRegisterMeth - the method to call after MBean registration
preDeregisterMeth - the method to call before MBean deregistration
postDeregisterMeth - the method to call after MBean registration
Method Detail

getObjectName

public javax.management.ObjectName getObjectName()
Returns the MBean name used to register it.

Returns:
the MBean name used to register it.

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws Exception
This method is executed before the MBean registration.

Specified by:
preRegister in interface javax.management.MBeanRegistration
Parameters:
server - the server on which the MBean will be registered
name - the name of the MBean to expose
Returns:
the name with which the MBean will be registered
Throws:
Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException.

postRegister

public void postRegister(Boolean registrationDone)
This method is executed after the MBean registration.

Specified by:
postRegister in interface javax.management.MBeanRegistration
Parameters:
registrationDone - indicates whether or not the MBean has been successfully registered in the MBean server.

preDeregister

public void preDeregister()
                   throws Exception
This method is before after the MBean deregistration.

Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException.

postDeregister

public void postDeregister()
This method is executed after the MBean deregistration.

Specified by:
postDeregister in interface javax.management.MBeanRegistration


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.