org.jboss.management.j2ee
Interface StateManageable

All Superinterfaces:
EventProvider
All Known Subinterfaces:
JavaMailResourceMBean, JDBCDataSourceMBean, JDBCResourceMBean, JNDIResourceMBean, MBeanMBean, URLResourceMBean
All Known Implementing Classes:
JavaMailResource, JDBCDataSource, JDBCResource, JNDIResource, MBean, URLResource

public interface StateManageable
extends EventProvider

Indicates that this Managed Object supports all the operations and attributes to support state management. An Managed Object implementing this interface is termed as State Manageable Object (SMO). An SMO generates events when its state changes.

Attention: This interface is not indented to be used by the client but it is morely a desription of what the client will get when he/she receives attributes from the JSR-77 server or what method can be invoked.

All attributes (getXXX) can be received by
Management.getAttribute()
or in bulk by:
Management.getAttributes()
Methods (all except getXXX()) can be invoked by:
Management.invoke()

Version:
$Revision: 1.9.4.3 $
Author:
Marc Fleury, Andreas Schaefer

Field Summary
static int CREATED
           
static int DESTROYED
           
static int FAILED
           
static int REGISTERED
           
static int RUNNING
           
static int STARTING
           
static int STOPPED
           
static int STOPPING
           
static int UNREGISTERED
           
 
Method Summary
 long getStartTime()
           
 int getState()
           
 String getStateString()
           
 void mejbStart()
          Starts this SMO which can only be invoked when the SMO is in the State stopped.
 void mejbStartRecursive()
          Starts this SMO like start().
 void mejbStop()
          Stops this SMO which can only be into the running or starting.
 
Methods inherited from interface org.jboss.management.j2ee.EventProvider
getEventType, getEventTypes
 

Field Detail

STARTING

static final int STARTING
See Also:
Constant Field Values

RUNNING

static final int RUNNING
See Also:
Constant Field Values

STOPPING

static final int STOPPING
See Also:
Constant Field Values

STOPPED

static final int STOPPED
See Also:
Constant Field Values

FAILED

static final int FAILED
See Also:
Constant Field Values

CREATED

static final int CREATED
See Also:
Constant Field Values

DESTROYED

static final int DESTROYED
See Also:
Constant Field Values

REGISTERED

static final int REGISTERED
See Also:
Constant Field Values

UNREGISTERED

static final int UNREGISTERED
See Also:
Constant Field Values
Method Detail

getStartTime

long getStartTime()
Returns:
The Time (in milliseconds since 1/1/1970 00:00:00) that this managed object was started

getState

int getState()
Returns:
Current State of the SMO which could be either starting, running, stopping, stopped or failed

getStateString

String getStateString()
Returns:
Current State string from amont STARTING, RUNNING, STOPPING, STOPPED or FAILED

mejbStart

void mejbStart()
Starts this SMO which can only be invoked when the SMO is in the State stopped. The SMO will go into the State started and after it completes successfully the SMO will go to the State running. The children of the SMO will not be started by this method call.

Attention: According to the specification this is named start() but in order to avoid name conflicts this is renamed to mejbStart(). The MEJB interface will make the conversion from start to mejbStart to make it transparent to the client.


mejbStartRecursive

void mejbStartRecursive()
Starts this SMO like start(). After the SMO is started all its children in the State of stopped theirs startRecursive() are started too.

Attention: According to the specification this is named startRecursive() but in order to avoid name conflicts this is renamed to mejbStartRecursive(). The MEJB interface will make the conversion from startRecursive to mejbStartRecursive to make it transparent to the client.


mejbStop

void mejbStop()
Stops this SMO which can only be into the running or starting. The State will change to stoping and after it completes successfully it will go into the State stopped. Afterwards all its children stop() method is called.

Attention: According to the specification this is named stop() but in order to avoid name conflicts this is renamed to mejbStop(). The MEJB interface will make the conversion from stop to mejbStop to make it transparent to the client.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.