org.baswell.easybeans
Class EasyBeanNotificationWrapper
java.lang.Object
org.baswell.easybeans.EasyBeanWrapper
org.baswell.easybeans.EasyBeanNotificationWrapper
- All Implemented Interfaces:
- javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, EasyBeansNotifier
public class EasyBeanNotificationWrapper
- extends EasyBeanWrapper
- implements javax.management.NotificationEmitter, EasyBeansNotifier
This wrapper should be used if the wrapped bean supports JMX based notifications. To support notifications the supplied
bean needs to either implement EasyBeansNotifierUser
or NotificationBroadcaster
or NotificationEmitter
.
Method Summary |
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
void |
notify(javax.management.Notification notification)
|
void |
notify(java.lang.String type,
java.lang.String message)
|
void |
removeNotificationListener(javax.management.NotificationListener listener)
|
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EasyBeanNotificationWrapper
public EasyBeanNotificationWrapper(EasyBeansNotifierUser bean)
throws InvalidEasyBeanNameException,
InvalidEasyBeanAnnotation,
InvalidEasyBeanOpenType
- Parameters:
bean
-
- Throws:
InvalidEasyBeanNameException
InvalidEasyBeanAnnotation
InvalidEasyBeanOpenType
EasyBeanNotificationWrapper
public EasyBeanNotificationWrapper(javax.management.NotificationBroadcaster bean)
throws InvalidEasyBeanNameException,
InvalidEasyBeanAnnotation,
InvalidEasyBeanOpenType
- Parameters:
bean
-
- Throws:
InvalidEasyBeanNameException
InvalidEasyBeanAnnotation
InvalidEasyBeanOpenType
notify
public void notify(java.lang.String type,
java.lang.String message)
- Specified by:
notify
in interface EasyBeansNotifier
- Parameters:
type
- The notification type.message
- The notification message.
notify
public void notify(javax.management.Notification notification)
- Specified by:
notify
in interface EasyBeansNotifier
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws java.lang.IllegalArgumentException
- Specified by:
addNotificationListener
in interface javax.management.NotificationBroadcaster
- Throws:
java.lang.IllegalArgumentException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationEmitter
- Throws:
javax.management.ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException