|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.baswell.easybeans.EasyBeansRegistery
public class EasyBeansRegistery
Helper class for registering and unregistering Java beans and JMX MBeans. All beans are registered with
ManagementFactory.getPlatformMBeanServer()
.
Constructor Summary | |
---|---|
EasyBeansRegistery()
|
|
EasyBeansRegistery(javax.management.MBeanServer mBeanServer)
|
Method Summary | |
---|---|
void |
register(java.util.List beans)
Registers each of the given beans. |
void |
register(java.lang.Object bean)
If the given bean is already an instanceof of EasyBeanWrapper then the given bean
will be registered directly with the MBean server. |
void |
unregister(java.lang.Object bean)
Unregisters the given bean from the MBean server. |
void |
unregisterAll()
Unregisters all previously registered beans. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EasyBeansRegistery()
public EasyBeansRegistery(javax.management.MBeanServer mBeanServer)
Method Detail |
---|
public void register(java.lang.Object bean) throws InvalidEasyBeanNameException, InvalidEasyBeanAnnotation, InvalidEasyBeanOpenType, ObjectNameAlreadyRegistered, UnexpectedEasyBeanException
EasyBeanWrapper
then the given bean
will be registered directly with the MBean server. Otherwise the object will be wrapped with either EasyBeanNotificationWrapper
(if the bean implements EasyBeansNotifierUser
or NotificationBroadcaster
) or a EasyBeanWrapper
.
bean
- The bean to register.
InvalidEasyBeanNameException
- If the ObjectName used for this bean in invalid.
InvalidEasyBeanAnnotation
- If an EasyBean annotation is used incorrectly.
InvalidEasyBeanOpenType
- If the given object (or a descendant of this object) cannot be mapped to an OpenType.
ObjectNameAlreadyRegistered
- If the object name used for this bean is already registered.
UnexpectedEasyBeanException
- If something unexpected occurred.public void register(java.util.List beans) throws InvalidEasyBeanNameException, InvalidEasyBeanAnnotation, InvalidEasyBeanOpenType, ObjectNameAlreadyRegistered, UnexpectedEasyBeanException
beans
-
InvalidEasyBeanNameException
- If the ObjectName used for this bean in invalid.
InvalidEasyBeanAnnotation
- If an EasyBean annotation is used incorrectly.
InvalidEasyBeanOpenType
- If the given object (or a descendant of this object) cannot be mapped to an OpenType.
ObjectNameAlreadyRegistered
- If the object name used for this bean is already registered.
UnexpectedEasyBeanException
- If something unexpected occurred.register(Object)
public void unregister(java.lang.Object bean) throws UnexpectedEasyBeanException
bean
-
UnexpectedEasyBeanException
- If something unexpected occurred.public void unregisterAll()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |