public abstract class ModelSystemService extends Object implements LifeCycleMBean, NotificationEmitter
| Modifier and Type | Field and Description |
|---|---|
protected ObjectName |
mAdminServiceMBeanName
JMX object names for all JBI schemaorg_apache_xmlbeans.system "service" mbeans:
|
protected ObjectName |
mConfigServiceMBeanName |
protected ObjectName |
mDeployServiceMBeanName |
protected String |
mDisplayName
User-friendly display name to be used by ModelSystemService methods:
|
protected EnvironmentContext |
mEnv |
protected MBeanSet |
mInitialMBeans |
protected ObjectName |
mInstallServiceMBeanName |
protected JbiNameInfo |
mJbiNameInfo
handle to jbi schemaorg_apache_xmlbeans.system or installed component identification:
|
protected ObjectName |
mLifeCycleMBeanName
JMX object names for standard mbeans:
|
protected Logger |
mLogger
Logger to be used by ModelSystemService methods:
|
protected LoggerMBean |
mLoggerImpl
The default logger implementation, all logger tasks are delegated to
this MBean
|
protected ObjectName |
mLoggerMBeanName |
protected ObjectName |
mLoggingServiceMBeanName |
protected MBeanNames |
mMBeanNames
handle to our MBean Namer:
|
protected MBeanServer |
mMBeanServer
handle to our MBean Server:
|
protected ObjectName |
mMessageServiceMBeanName |
protected String |
mModelName |
protected MBeanSet |
mStartMBeans |
protected ObjectName |
mStatisticsMBeanName |
protected StringTranslator |
mTranslator
Handle to StringTranslator for message translation:
|
SHUTDOWN, STARTED, STOPPED, UNKNOWN| Constructor and Description |
|---|
ModelSystemService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Adds a listener to this MBean.
|
protected void |
bootstrap()
perform one-time startup tasks for this model
|
protected ComponentQuery |
getComponentQuery()
Get a reference to ComponentQuery.
|
String |
getCurrentState()
Get the current state of this managed compononent.
|
NotificationBroadcasterSupport |
getNotificationBroadcaster()
Getter for local NotificationBroadcaster.
|
MBeanNotificationInfo[] |
getNotificationInfo()
Returns an array indicating, for each notification this
MBean may send, the name of the Java class of the notification
and the notification type.
|
protected Registry |
getRegistry()
Get a reference to the JBI registry.
|
protected void |
initModelSystemService(EnvironmentContext anEnv,
JbiNameInfo aJbiName)
allocate a logger, and then initialize the ModelSystemService.
|
protected void |
initModelSystemService(EnvironmentContext anEnv,
Logger aLogger,
JbiNameInfo aJbiName)
Initialize the ModelSystemService.
|
void |
removeNotificationListener(NotificationListener listener)
Removes a listener from this MBean.
|
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from this MBean.
|
void |
shutDown()
Shut down the item.
|
void |
start()
Start the item.
|
void |
stop()
Stop the item.
|
protected ObjectName mAdminServiceMBeanName
protected ObjectName mConfigServiceMBeanName
protected ObjectName mInstallServiceMBeanName
protected ObjectName mLoggingServiceMBeanName
protected ObjectName mDeployServiceMBeanName
protected ObjectName mMessageServiceMBeanName
protected EnvironmentContext mEnv
protected MBeanSet mInitialMBeans
protected MBeanSet mStartMBeans
protected Logger mLogger
protected MBeanServer mMBeanServer
protected MBeanNames mMBeanNames
protected JbiNameInfo mJbiNameInfo
protected String mDisplayName
protected LoggerMBean mLoggerImpl
protected ObjectName mLifeCycleMBeanName
protected ObjectName mLoggerMBeanName
protected ObjectName mStatisticsMBeanName
protected final String mModelName
protected StringTranslator mTranslator
protected void initModelSystemService(EnvironmentContext anEnv, JbiNameInfo aJbiName)
protected void initModelSystemService(EnvironmentContext anEnv, Logger aLogger, JbiNameInfo aJbiName)
protected void bootstrap()
public void start()
throws JBIException
start in interface LifeCycleMBeanJBIException - if the item fails to start.public void stop()
throws JBIException
stop in interface LifeCycleMBeanJBIException - if the item fails to stop.public void shutDown()
throws JBIException
shutDown in interface LifeCycleMBeanJBIException - if the item fails to shut down.public String getCurrentState()
getCurrentState in interface LifeCycleMBeanprotected Registry getRegistry()
protected ComponentQuery getComponentQuery()
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
addNotificationListener in interface NotificationBroadcasterlistener - The listener object which will handle the
notifications emitted by the broadcaster.filter - The filter object. If filter is null, no
filtering will be performed before handling notifications.handback - An opaque object to be sent back to the
listener when a notification is emitted. This object cannot be
used by the Notification broadcaster object. It should be
resent unchanged with the notification to the listener.IllegalArgumentException - Listener parameter is null.removeNotificationListener(javax.management.NotificationListener)public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener in interface NotificationBroadcasterlistener - A listener that was previously added to this
MBean.ListenerNotFoundException - The listener is not
registered with the MBean.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object),
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)public MBeanNotificationInfo[] getNotificationInfo()
Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.
It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.
getNotificationInfo in interface NotificationBroadcasterpublic void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
Removes a listener from this MBean. The MBean must have a
listener that exactly matches the given listener,
filter, and handback parameters. If
there is more than one such listener, only one is removed.
The filter and handback parameters
may be null if and only if they are null in a listener to be
removed.
removeNotificationListener in interface NotificationEmitterlistener - A listener that was previously added to this
MBean.filter - The filter that was specified when the listener
was added.handback - The handback that was specified when the listener was
added.ListenerNotFoundException - The listener is not
registered with the MBean, or it is not registered with the
given filter and handback.public NotificationBroadcasterSupport getNotificationBroadcaster()
Copyright © 2011-2016 OpenESB Community. All Rights Reserved.