站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 management API Documentation 英文版文档

StateManageable (JBoss/Management API) - JBoss 4.0.1 sp1 management API Documentation 英文版文档


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 $
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 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

public static final int STARTING
See Also:
Constant Field Values

RUNNING

public static final int RUNNING
See Also:
Constant Field Values

STOPPING

public static final int STOPPING
See Also:
Constant Field Values

STOPPED

public static final int STOPPED
See Also:
Constant Field Values

FAILED

public static final int FAILED
See Also:
Constant Field Values

CREATED

public static final int CREATED
See Also:
Constant Field Values

DESTROYED

public static final int DESTROYED
See Also:
Constant Field Values

REGISTERED

public static final int REGISTERED
See Also:
Constant Field Values

UNREGISTERED

public static final int UNREGISTERED
See Also:
Constant Field Values
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 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.



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