public abstract class LifecycleMBeanBase extends LifecycleBase implements javax.management.MBeanRegistration
Modifier and Type | Field and Description |
---|---|
protected javax.management.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.
|
java.lang.String |
getDomain()
Obtain the domain under which this component will be / has been
registered.
|
protected abstract java.lang.String |
getDomainInternal()
Method implemented by sub-classes to identify the domain in which MBeans
should be registered.
|
javax.management.ObjectName |
getObjectName()
Obtain the name under which this component has been registered with JMX.
|
protected abstract java.lang.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(java.lang.Boolean registrationDone)
Not used - NOOP.
|
void |
preDeregister()
Not used - NOOP.
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Allows the object to be registered with an alternative
MBeanServer and/or ObjectName . |
protected javax.management.ObjectName |
register(java.lang.Object obj,
java.lang.String objectNameKeyProperties)
Utility method to enable sub-classes to easily register additional
components that don't implement
MBeanRegistration with
an MBean server. |
void |
setDomain(java.lang.String domain)
Specify the domain under which this component should be registered.
|
protected void |
unregister(javax.management.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, stopInternal
protected void initInternal() throws LifecycleException
initInternal
in class LifecycleBase
LifecycleException
protected void destroyInternal() throws LifecycleException
destroyInternal
in class LifecycleBase
LifecycleException
public final void setDomain(java.lang.String domain)
public final java.lang.String getDomain()
protected abstract java.lang.String getDomainInternal()
public final javax.management.ObjectName getObjectName()
protected abstract java.lang.String getObjectNameKeyProperties()
ObjectName
that will be used to register this component.ObjectName
protected final javax.management.ObjectName register(java.lang.Object obj, java.lang.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(javax.management.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 javax.management.MBeanRegistration
public final void postRegister(java.lang.Boolean registrationDone)
postRegister
in interface javax.management.MBeanRegistration
public final void preDeregister() throws java.lang.Exception
preDeregister
in interface javax.management.MBeanRegistration
java.lang.Exception
public final javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
MBeanServer
and/or ObjectName
.preRegister
in interface javax.management.MBeanRegistration
java.lang.Exception
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.