public abstract class LifecycleMBeanBase extends LifecycleBase implements MBeanRegistration
| Modifier and Type | Field and Description |
|---|---|
protected MBeanServer |
mserver |
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
LifecycleMBeanBase() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
destroyInternal()
Sub-classes wishing to perform additional clean-up should override this
method, ensuring that super.destroyInternal() is the last call in the
overriding method.
|
String |
getDomain()
Obtain the domain under which this component will be / has been
registered.
|
protected abstract String |
getDomainInternal()
Method implemented by sub-classes to identify the domain in which MBeans
should be registered.
|
ObjectName |
getObjectName()
Obtain the name under which this component has been registered with JMX.
|
protected abstract String |
getObjectNameKeyProperties()
Allow sub-classes to specify the key properties component of the
ObjectName that will be used to register this component. |
protected void |
initInternal()
Sub-classes wishing to perform additional initialization should override
this method, ensuring that super.initInternal() is the first call in the
overriding method.
|
void |
postDeregister()
Not used - NOOP.
|
void |
postRegister(Boolean registrationDone)
Not used - NOOP.
|
void |
preDeregister()
Not used - NOOP.
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
Allows the object to be registered with an alternative
MBeanServer and/or ObjectName. |
protected ObjectName |
register(Object obj,
String objectNameKeyProperties)
Utility method to enable sub-classes to easily register additional
components that don't implement
MBeanRegistration with
an MBean server. |
void |
setDomain(String domain)
Specify the domain under which this component should be registered.
|
protected void |
unregister(ObjectName on)
Utility method to enable sub-classes to easily unregister additional
components that don't implement
MBeanRegistration with
an MBean server. |
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, startInternal, stop, stopInternalprotected MBeanServer mserver
protected void initInternal()
throws LifecycleException
initInternal in class LifecycleBaseLifecycleExceptionprotected void destroyInternal()
throws LifecycleException
destroyInternal in class LifecycleBaseLifecycleExceptionpublic final void setDomain(String domain)
public final String getDomain()
protected abstract String getDomainInternal()
public final ObjectName getObjectName()
protected abstract String getObjectNameKeyProperties()
ObjectName that will be used to register this component.ObjectNameprotected final ObjectName register(Object obj, String objectNameKeyProperties)
MBeanRegistration with
an MBean server.initInternal() has
been called and before destroyInternal() has been called.obj - The object the registerobjectNameKeyProperties - The key properties component of the
object name to use to register the
objectprotected final void unregister(ObjectName on)
MBeanRegistration with
an MBean server.initInternal() has
been called and before destroyInternal() has been called.on - The name of the component to unregisterpublic final void postDeregister()
postDeregister in interface MBeanRegistrationpublic final void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistrationpublic final void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationExceptionpublic final ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
MBeanServer and/or ObjectName.preRegister in interface MBeanRegistrationExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.