|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.management.SingleMBeanObject<I>
public class SingleMBeanObject<I>
Wrapper class for registering objects of type I as MBeans. The register method will register a given obejct under an object name, generated with the domain given in constructor, and fields from the Hashtable nameProperties. It is prefilled with values common for all MBeans, but it is expected to be extended after the object is created with additional info.
Constructor Summary | |
---|---|
SingleMBeanObject(javax.management.ObjectName name,
I o,
java.lang.Class<I> asInterface,
javax.management.MBeanServer mBeanServer)
Create a single mbean object. |
|
SingleMBeanObject(java.lang.String domain,
I object,
java.lang.Class<I> asInterface,
javax.management.MBeanServer mBeanServer)
Create a single mbean object. |
Method Summary | |
---|---|
javax.management.ObjectName |
getName()
|
java.util.Hashtable<java.lang.String,java.lang.String> |
getNameProperties()
Properties for the ObjectName name. |
void |
register()
Registers this object as a standard MBean, with a name generated from domain given in constructor and the nameProperties hashTable. |
void |
unregister()
Unregister the object from the MBeanServer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleMBeanObject(java.lang.String domain, I object, java.lang.Class<I> asInterface, javax.management.MBeanServer mBeanServer)
domain
- The domain of the MBean.object
- The object to expose as an MBean.asInterface
- The interface this MBean is exposed as.mBeanServer
- The server to register the mbean in.
ArgumentNotValid
- If domain is null or empty, or any other
argument is null.public SingleMBeanObject(javax.management.ObjectName name, I o, java.lang.Class<I> asInterface, javax.management.MBeanServer mBeanServer)
name
- The object name to register under.o
- The object to register.asInterface
- The interface o should implement.mBeanServer
- The mbean server to register o in.
ArgumentNotValid
- on any null parameter.Method Detail |
---|
public java.util.Hashtable<java.lang.String,java.lang.String> getNameProperties()
public void register()
IllegalState
- if bean is already registered.
IOFailure
- on trouble registering.public void unregister()
IOFailure
- on trouble unregistering.public javax.management.ObjectName getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |