ABLE, Version 1.1b

com.ibm.able
Class AbleState

java.lang.Object
  |
  +--com.ibm.able.AbleState

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

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

Version:
$Revision: 1.5 $, $Date: 2000/03/23 17:41:23 $
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()
          Retrieve the current state.
 void setState(int theNewState)
          Set the current state to the specified value.
static java.lang.String State(int theItem)
          Turn the specified state into a String 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..

Method Detail

State

public static final java.lang.String State(int theItem)
Turn the specified state into a String for error messages.
Parameters:
theItem - A valid (or invalid) AbleState..

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

See Also:
getState()

getState

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

See Also:
setState(int)

toString

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

Overrides:
toString in class java.lang.Object

Copyright

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


ABLE, Version 1.1b

ABLE: Produced by Joe, Don, and Jeff who say, 'Thanks for your support.'