|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.jmx.MBeansHelper
public final class MBeansHelper
Singleton object.Creates the MBeans and register them.
Field Summary | |
---|---|
private boolean |
activate
Is Management activated ? |
private java.util.Map<java.lang.Class,EZBManagementIdentifier> |
identifiers
The Identifier in charge of creating the right ObjectName for a given instance. |
private static MBeansHelper |
instance
Singleton instance. |
private static JLog |
logger
Logger. |
Constructor Summary | |
---|---|
private |
MBeansHelper()
Singleton class, no public constructor. |
Method Summary | ||
---|---|---|
void |
activate(boolean activate)
Activate the MBeans registration. |
|
private
|
getIdentifier(T instance)
|
|
static MBeansHelper |
getInstance()
|
|
|
getObjectName(T instance)
|
|
|
registerMBean(T instance)
Register the instance as a ModelMBean using the delegate. |
|
|
unregisterMBean(T instance)
Unregister the given Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private static MBeansHelper instance
private java.util.Map<java.lang.Class,EZBManagementIdentifier> identifiers
private boolean activate
Constructor Detail |
---|
private MBeansHelper()
Method Detail |
---|
public static MBeansHelper getInstance()
public void activate(boolean activate)
activate
- true
if mbeans should be
registered, false
otherwise.public <T> void registerMBean(T instance) throws MBeansException
T
- instance Typeinstance
- Object instance to be managed
MBeansException
- if registration fails.public <T> void unregisterMBean(T instance) throws MBeansException
T
- instance Typeinstance
- Instance to be deregistered.
MBeansException
- if unregistration fails.public <T> java.lang.String getObjectName(T instance) throws MBeansException
T
- instance Typeinstance
- Object instance to be managed
MBeansException
- if registration fails.private <T> EZBManagementIdentifier<T> getIdentifier(T instance) throws MBeansException
T
- instance typeinstance
- instance to be managed.
EZBManagementIdentifier
for the given Resource type.
MBeansException
- if the Identifier cannot be returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |