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

StateMachine.ChangeEvent (JBoss/Common API) - JBoss 3.2.7 common API Documentation 英文版文档


org.jboss.util.state
Class StateMachine.ChangeEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.jboss.util.state.StateMachine.ChangeEvent
All Implemented Interfaces:
Serializable
Enclosing class:
StateMachine

public static class StateMachine.ChangeEvent
extends EventObject

An event for state change notifications.

See Also:
Serialized Form

Field Summary
 State current
           
 State previous
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
StateMachine.ChangeEvent(StateMachine source, State previous, State current)
           
 
Method Summary
 State getCurrentState()
          The current state of the machine.
 State getPreviousState()
          The previous state of the machine.
 StateMachine getStateMachine()
          The state machine which generated the event.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

previous

public final State previous

current

public final State current
Constructor Detail

StateMachine.ChangeEvent

public StateMachine.ChangeEvent(StateMachine source,
                                State previous,
                                State current)
Method Detail

getPreviousState

public State getPreviousState()
The previous state of the machine.

This value will not be null unless the initial state of the machine implements Acceptable. This can be used to determine when the state machine has been reset.

Returns:
The previous state of the machine.

getCurrentState

public State getCurrentState()
The current state of the machine. ie. The state the machine has just transition into and which triggered the change event.

Returns:
The current state of the machine; will not be null.

getStateMachine

public StateMachine getStateMachine()
The state machine which generated the event.


toString

public String toString()


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