org.jboss.management.j2ee
Interface StateManageable

All Superinterfaces:
EventProvider (src)

public interface StateManageable
extends EventProvider (src)

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()


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()
           
 java.lang.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 start().
 void mejbStop()
          Stops this SMO which can only be into the running or starting.
 
Methods inherited from interface org.jboss.management.j2ee.EventProvider (src)
getEventType, getEventTypes
 

Field Detail

STARTING

public static final int STARTING
See Also:
Constant Field Values (src)

RUNNING

public static final int RUNNING
See Also:
Constant Field Values (src)

STOPPING

public static final int STOPPING
See Also:
Constant Field Values (src)

STOPPED

public static final int STOPPED
See Also:
Constant Field Values (src)

FAILED

public static final int FAILED
See Also:
Constant Field Values (src)

CREATED

public static final int CREATED
See Also:
Constant Field Values (src)

DESTROYED

public static final int DESTROYED
See Also:
Constant Field Values (src)

REGISTERED

public static final int REGISTERED
See Also:
Constant Field Values (src)

UNREGISTERED

public static final int UNREGISTERED
See Also:
Constant Field Values (src)
Method Detail

getStartTime

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

getState

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

getStateString

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

mejbStart

public 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 @STARTING 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

public void mejbStartRecursive()
Starts this SMO like @start start(). After the SMO is started all its children in the State of @STOPPED 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

public 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.