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

StateAdapter (JBoss/Common API) - JBoss 3.2.7 common API Documentation 英文版文档


org.jboss.util.state
Class StateAdapter

java.lang.Object
  extended byorg.jboss.util.CloneableObject
      extended byorg.jboss.util.state.State
          extended byorg.jboss.util.state.StateAdapter
All Implemented Interfaces:
Cloneable, EventListener, Serializable, StateMachine.Acceptable, StateMachine.ChangeListener

public class StateAdapter
extends State
implements StateMachine.Acceptable, StateMachine.ChangeListener

A helper state for instances which need to be StateMachine.Acceptable and/or StateMachine.ChangeListeners.

Version:
$Revision: 1.3 $
Author:
Jason Dillon
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jboss.util.CloneableObject
CloneableObject.Cloneable
 
Field Summary
 
Fields inherited from class org.jboss.util.state.State
name, opaque, value
 
Constructor Summary
StateAdapter(int value)
           
StateAdapter(int value, String name)
           
 
Method Summary
 boolean isAcceptable(State state)
          Always returns false.
 void stateChanged(StateMachine.ChangeEvent event)
          Invoked after a state has been changed.
 
Methods inherited from class org.jboss.util.state.State
equals, getName, getOpaque, getValue, hashCode, setOpaque, toIdentityString, toString
 
Methods inherited from class org.jboss.util.CloneableObject
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateAdapter

public StateAdapter(int value,
                    String name)

StateAdapter

public StateAdapter(int value)
Method Detail

isAcceptable

public boolean isAcceptable(State state)
Always returns false.

Specified by:
isAcceptable in interface StateMachine.Acceptable
Parameters:
state - The state to determine acceptability; must not be null.
Returns:
False;

stateChanged

public void stateChanged(StateMachine.ChangeEvent event)
Description copied from interface: StateMachine.ChangeListener
Invoked after a state has been changed.

Specified by:
stateChanged in interface StateMachine.ChangeListener
Parameters:
event - The state event, which encodes that data for the state change.


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