ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able
Class AbleState

java.lang.Object
  |
  +--com.ibm.able.AbleState
All Implemented Interfaces:
java.io.Serializable

public class AbleState
extends java.lang.Object
implements java.io.Serializable

The AbleState class provides a set of state definitions for ABLE beans and agents.

See Also:
Serialized Form

Field Summary
static int Active
          The object is active; it has been invoked.
static int Initiated
          The object has just been created.
static int NumberOfStates
          The total number of known states.
static int Suspended
          The object is currently suspended.
static int Transit
          The object is in transit.
static int Uninitiated
          The object's constructor has just completed.
static int Unknown
          The object is in an unknown state.
static int Waiting
          The object is currently waiting.
 
Constructor Summary
AbleState()
          Create a new state and set it to the value Unknown.
AbleState(int theInitialState)
          Create a new state and set it to the specified value.
 
Method Summary
static java.lang.String Copyright()
          Determine the copyright of this class.
 int getState()
          Returns the current state.
static boolean isReady(int state)
          The isReady method examines the state value to determine if a bean is capable of processing data, whether by dataflow, synchronous or asynchronous event passing, or timed interval processing.
 void setState(int theNewState)
          Set the current state to the specified value.
static java.lang.String State(int theItem)
          Returns the specified state as text for error messages.
 java.lang.String toString()
          Retrieve a string describing (the contents of) the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Unknown

public static final int Unknown
The object is in an unknown state.

Uninitiated

public static final int Uninitiated
The object's constructor has just completed.

Initiated

public static final int Initiated
The object has just been created.

Active

public static final int Active
The object is active; it has been invoked.

Waiting

public static final int Waiting
The object is currently waiting.

Suspended

public static final int Suspended
The object is currently suspended.

Transit

public static final int Transit
The object is in transit.

NumberOfStates

public static final int NumberOfStates
The total number of known states.
Constructor Detail

AbleState

public AbleState()
Create a new state and set it to the value Unknown.

AbleState

public AbleState(int theInitialState)
Create a new state and set it to the specified value.
Parameters:
theInitialState - A valid AbleState value.

Method Detail

State

public static final java.lang.String State(int theItem)
Returns the specified state as text for error messages.
Parameters:
theItem - A valid (or invalid) AbleState value.

Returns:
A string of the original input concatenated with a colon followed by the Java state constant; for example, "Active" is returned if the input argument is the AbleState.Active. If the input integer is not a valid AbleState, "AbleState.Unrecognized:n" is returned, where "n" is the original input argument.


setState

public void setState(int theNewState)
Set the current state to the specified value.
Parameters:
theNewState - A valid AbleState value. If an unknown value is provided, an error message is logged, but the state field is unchanged.

getState

public final int getState()
Returns the current state.
Returns:
An AbleState value.

isReady

public static boolean isReady(int state)
The isReady method examines the state value to determine if a bean is capable of processing data, whether by dataflow, synchronous or asynchronous event passing, or timed interval processing.
Returns:
true if the state is Active, Initiated, or Waiting.

toString

public java.lang.String toString()
Retrieve a string describing (the contents of) the object.
Overrides:
toString in class java.lang.Object
Returns:
A String containing the current contents of the object.


Copyright

public static java.lang.String Copyright()
Determine the copyright of this class.
Returns:
A String containing this class's copyright statement.


ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003