org.jboss.monitor
Class BeanCacheMonitor

java.lang.Object
  extended byorg.jboss.monitor.BeanCacheMonitor
All Implemented Interfaces:
BeanCacheMonitorMBean (src) , MBeanRegistration (src)

public class BeanCacheMonitor
extends java.lang.Object
implements BeanCacheMonitorMBean (src) , MBeanRegistration (src)

See Also:
Monitorable (src)

Constructor Summary
BeanCacheMonitor()
           
 
Method Summary
 BeanCacheSnapshot (src) [] getSnapshots()
          Describe getSnapshots method here.
 java.util.Collection listSnapshots()
          The listSnapshots method returns a collection of BeanSnapshots showing the
 void postDeregister()
          This method is called by the MBeanServer after deregistration takes place.
 void postRegister(java.lang.Boolean registrationDone)
          This method is called by the MBeanServer after registration takes place or when registration fails.
 void preDeregister()
          This method is called by the MBeanServer before deregistration takes place.
 ObjectName (src) preRegister(MBeanServer (src)  server, ObjectName (src)  name)
          This method is called by the MBeanServer before registration takes place.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanCacheMonitor

public BeanCacheMonitor()
Method Detail

preRegister

public ObjectName (src)  preRegister(MBeanServer (src)  server,
                              ObjectName (src)  name)
                       throws java.lang.Exception
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer before registration takes place. The MBean is passed a reference of the MBeanServer it is about to be registered with. The MBean must return the ObjectName it will be registered with. The MBeanServer can pass a suggested object depending upon how the MBean is registered.

The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Specified by:
preRegister in interface MBeanRegistration (src)
Returns:
the actual ObjectName to register this MBean with.
Throws:
java.lang.Exception - for any error, the MBean is not registered.

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer after registration takes place or when registration fails.

Specified by:
postRegister in interface MBeanRegistration (src)
Parameters:
registrationDone - the MBeanServer passes true when the MBean was registered, false otherwise.

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer before deregistration takes place.

The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Specified by:
preDeregister in interface MBeanRegistration (src)
Throws:
java.lang.Exception

postDeregister

public void postDeregister()
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer after deregistration takes place.

Specified by:
postDeregister in interface MBeanRegistration (src)

getSnapshots

public BeanCacheSnapshot (src) [] getSnapshots()
Describe getSnapshots method here.

Specified by:
getSnapshots in interface BeanCacheMonitorMBean (src)
Returns:
a BeanCacheSnapshot[] value

listSnapshots

public java.util.Collection listSnapshots()
                                   throws JMException (src) 
The listSnapshots method returns a collection of BeanSnapshots showing the

Specified by:
listSnapshots in interface BeanCacheMonitorMBean (src)
Returns:
a Collection value
Throws:
JMException (src) - if an error occurs