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

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


org.jboss.management.j2ee
Class StateManagement

java.lang.Object
  extended byorg.jboss.management.j2ee.StateManagement
All Implemented Interfaces:
EventListener, javax.management.NotificationListener

public class StateManagement
extends Object
implements javax.management.NotificationListener

Root class of the JBoss JSR-77 implementation of StateManagement

Version:
$Revision: 1.14 $
Author:
Andreas Schaefer.

Field Summary
static int CREATED
           
static int DESTROYED
           
static int REGISTERED
           
static String[] stateTypes
          The int state to state name mappings
static int UNREGISTERED
           
 
Constructor Summary
StateManagement(J2EEManagedObject managedObject)
           
 
Method Summary
static int convertJBossState(int theState)
          Converts a state from JBoss ServiceMBean to the JSR-77 state
static int convertJSR77State(int theState)
          Converts a JSR-77 state to the JBoss ServiceMBean state
 long getStartTime()
           
 int getState()
           
 String getStateString()
           
 void handleNotification(javax.management.Notification msg, Object handback)
          A notification from the underlying JBoss service.
 void setStartTime(long pTime)
           
 void setState(int newState)
          Sets a new state and if it changed the appropriate state change event is sent.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

stateTypes

public static final String[] stateTypes
The int state to state name mappings

Constructor Detail

StateManagement

public StateManagement(J2EEManagedObject managedObject)
Parameters:
managedObject -
Throws:
InvalidParameterException - If the given Name is null
Method Detail

convertJBossState

public static int convertJBossState(int theState)
Converts a state from JBoss ServiceMBean to the JSR-77 state

Parameters:
theState - the JBoss ServiceMBean state.
Returns:
Converted state or -1 if unknown.

convertJSR77State

public static int convertJSR77State(int theState)
Converts a JSR-77 state to the JBoss ServiceMBean state

Parameters:
theState - the JSR-77 state.
Returns:
Converted state or -1 if unknown.

getStartTime

public long getStartTime()

setStartTime

public void setStartTime(long pTime)

getState

public int getState()

getStateString

public String getStateString()

setState

public void setState(int newState)
Sets a new state and if it changed the appropriate state change event is sent.

Parameters:
newState - Integer indicating the new state according to StateManageable constants

handleNotification

public void handleNotification(javax.management.Notification msg,
                               Object handback)
A notification from the underlying JBoss service.

Specified by:
handleNotification in interface javax.management.NotificationListener
Parameters:
msg - The notification msg, AttributeChangeNotification is what we care about
handback - not used

toString

public String toString()


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