Class MBeanCenter
java.lang.Object
ecmwf.common.mbean.MBeanCenter
-
Method Summary
Modifier and TypeMethodDescriptionstatic MBeanCenter
createMBeanCenter
(MBeanServer mBeanServer) Creates the MBean center.static MBeanCenter
Gets the MBean center.Gets the mbean server.void
handleNotification
(Notification notification, Object handback) Handle notification.void
registerMBean
(Object object, String URL) Register m bean.void
registerMBeanTimer
(String URL) Register m bean timer.void
Removes the notifications.scheduleNotifications
(MBeanListener listener, Date date, long period, String message) Schedule notifications.void
unregisterMBean
(String URL) Unregister m bean.void
Unregister m beans.
-
Method Details
-
createMBeanCenter
Creates the MBean center.- Parameters:
mBeanServer
- the MBean server- Returns:
- the MBean center
-
getMBeanCenter
Gets the MBean center.- Returns:
- the MBean center
- Throws:
InstanceNotFoundException
- the instance not found exception
-
registerMBean
public void registerMBean(Object object, String URL) throws NotCompliantMBeanException, InstanceAlreadyExistsException, MBeanRegistrationException, MalformedObjectNameException Register m bean.- Parameters:
object
- the objectURL
- the url- Throws:
NotCompliantMBeanException
- the not compliant m bean exceptionInstanceAlreadyExistsException
- the instance already exists exceptionMBeanRegistrationException
- the MBean registration exceptionMalformedObjectNameException
- the malformed object name exception
-
registerMBeanTimer
public void registerMBeanTimer(String URL) throws NotCompliantMBeanException, InstanceAlreadyExistsException, MBeanRegistrationException, MalformedObjectNameException Register m bean timer.- Parameters:
URL
- the url- Throws:
NotCompliantMBeanException
- the not compliant m bean exceptionInstanceAlreadyExistsException
- the instance already exists exceptionMBeanRegistrationException
- the MBean registration exceptionMalformedObjectNameException
- the malformed object name exception
-
unregisterMBean
public void unregisterMBean(String URL) throws MBeanRegistrationException, InstanceNotFoundException Unregister m bean.- Parameters:
URL
- the url- Throws:
MBeanRegistrationException
- the MBean registration exceptionInstanceNotFoundException
- the instance not found exception
-
unregisterMBeans
public void unregisterMBeans()Unregister m beans. -
getMBeanServer
-
scheduleNotifications
public Integer scheduleNotifications(MBeanListener listener, Date date, long period, String message) throws InstanceNotFoundException Schedule notifications.- Parameters:
listener
- the listenerdate
- the dateperiod
- the periodmessage
- the message- Returns:
- the integer
- Throws:
InstanceNotFoundException
- the instance not found exception
-
removeNotifications
Removes the notifications.- Parameters:
id
- the id- Throws:
InstanceNotFoundException
- the instance not found exception
-
handleNotification
Handle notification.- Specified by:
handleNotification
in interfaceNotificationListener
-