org.exolab.core.service
Class ServiceState

java.lang.Object
  extended by org.exolab.core.service.ServiceState

public final class ServiceState
extends java.lang.Object

This class defines an enumeration of service states. stopped the service is not running running the service is running

Version:
$Revision: 1.3 $ $Date: 2001/10/07 07:28:05 $
Author:
Jim Alateras

Field Summary
static ServiceState RUNNING
           
static ServiceState STOPPED
          Instatiate instances related to each of the enumerations
 
Method Summary
 boolean equals(java.lang.Object object)
          Return true if the two specified object are of the same type and their ordinal values are the same.
 int getOrd()
          Returns the ordinal value for this state
 boolean isRunning()
          Return true if this object represents the 'running' state and false otherwise
 boolean isStopped()
          Return true if this object represents the 'stopped' state and false otherwise
static int size()
          Returns the number of states in this enumeration
 java.lang.String toString()
          Returns the name of this state
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STOPPED

public static final ServiceState STOPPED
Instatiate instances related to each of the enumerations


RUNNING

public static final ServiceState RUNNING
Method Detail

getOrd

public int getOrd()
Returns the ordinal value for this state

Returns:
the ordinal value of the state

toString

public java.lang.String toString()
Returns the name of this state

Overrides:
toString in class java.lang.Object
Returns:
the state name

size

public static int size()
Returns the number of states in this enumeration

Returns:
the number of states in the enumeration

equals

public boolean equals(java.lang.Object object)
Return true if the two specified object are of the same type and their ordinal values are the same.

Overrides:
equals in class java.lang.Object
Parameters:
object - the object to compare against
Returns:
true if the two objects are equivalent

isRunning

public boolean isRunning()
Return true if this object represents the 'running' state and false otherwise

Returns:
true if this state is the 'running' state

isStopped

public boolean isStopped()
Return true if this object represents the 'stopped' state and false otherwise

Returns:
true if this state is the 'stopped' state


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.