org.jboss.management.j2ee
Class MBean

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.management.j2ee.J2EEManagedObject (src) 
              extended byorg.jboss.management.j2ee.MBean
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class MBean
extends J2EEManagedObject (src)

Root class of the JBoss implementation of a custom MBean managed object.


Field Summary
 
Fields inherited from class org.jboss.management.j2ee.J2EEManagedObject (src)
NAME, TYPE
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
MBean(java.lang.String pName, ObjectName (src)  pServiceModule, ObjectName (src)  pTarget)
           
 
Method Summary
static ObjectName (src) create(MBeanServer (src)  pServer, java.lang.String pServiceModule, ObjectName (src)  pTarget)
          Create a
static void destroy(MBeanServer (src)  pServer, java.lang.String pName)
           
 java.lang.String getEventType(int pIndex)
           
 java.lang.String[] getEventTypes()
           
protected  java.util.Hashtable getParentKeys(ObjectName (src)  pParent)
          This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents.
 long getStartTime()
           
 int getState()
           
 java.lang.String getStateString()
           
 boolean isstateMonitored()
          Does the MBean monitor state changes of the JBoss MBean service.
 void mejbStart()
           
 void mejbStartRecursive()
           
 void mejbStop()
           
 void postCreation()
           
 void preDestruction()
           
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.management.j2ee.J2EEManagedObject (src)
addChild, getobjectName, getObjectName, getObjectName, getparent, getType, getType, iseventProvider, isstateManageable, isstatisticsProvider, newObjectName, postRegister, preDeregister, removeChild, removeObject, removeObject, sendNotification, setparent
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, preRegister, start, startService, stop, stopService
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MBean

public MBean(java.lang.String pName,
             ObjectName (src)  pServiceModule,
             ObjectName (src)  pTarget)
      throws MalformedObjectNameException (src) ,
             InvalidParentException (src) 
Parameters:
pName - Name of the MBean
Method Detail

create

public static ObjectName (src)  create(MBeanServer (src)  pServer,
                                java.lang.String pServiceModule,
                                ObjectName (src)  pTarget)
Create a

Parameters:
pServer -
pServiceModule -
pTarget -
Returns:

destroy

public static void destroy(MBeanServer (src)  pServer,
                           java.lang.String pName)

isstateMonitored

public boolean isstateMonitored()
Does the MBean monitor state changes of the JBoss MBean service.

Returns:
True if the underlying JBoss MBean service is monitored for state changes.

postCreation

public void postCreation()
Overrides:
postCreation in class J2EEManagedObject (src)

preDestruction

public void preDestruction()
Overrides:
preDestruction in class J2EEManagedObject (src)

getEventTypes

public java.lang.String[] getEventTypes()

getEventType

public java.lang.String getEventType(int pIndex)

getStartTime

public long getStartTime()

getState

public int getState()
Specified by:
getState in interface ServiceMBean (src)
Overrides:
getState in class ServiceMBeanSupport (src)

getStateString

public java.lang.String getStateString()
Specified by:
getStateString in interface ServiceMBean (src)
Overrides:
getStateString in class ServiceMBeanSupport (src)

mejbStart

public void mejbStart()

mejbStartRecursive

public void mejbStartRecursive()

mejbStop

public void mejbStop()

toString

public java.lang.String toString()
Overrides:
toString in class J2EEManagedObject (src)

getParentKeys

protected java.util.Hashtable getParentKeys(ObjectName (src)  pParent)
Description copied from class: J2EEManagedObject (src)
This method can be overwritten by any subclass which must return <parent-j2eeType> indicating its parents. By default it returns an empty hashtable instance.

Overrides:
getParentKeys in class J2EEManagedObject (src)
Parameters:
pParent - The direct parent of this class
Returns:
A hashtable with the SAR-Module, J2EE-Application and J2EE-Server as parent