|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.ServiceState
public class ServiceState
A service's state.
When a service is first instantiated it will
be in a SERVICE_STATE_UNINITIALIZED
state. Once
the service has been initialized and is ready for use it transitions
to a state of SERVICE_STATE_INITIALIZED
.
Should the service need to be deactivated it will transition to
a state of SERVICE_STATE_DEACTIVATED
. This may occur
if the service needs to go offline while it is being reconfigured or
if the service is no longer available. In the reconfiguration case
the service will transition back to a state of
SERVICE_STATE_INITIALIZED
once its ready to resume services.
Field Summary | |
---|---|
static short |
SERVICE_STATE_DEACTIVATED
Service state: deactivated The service has been deactivated and is not currently available for use. |
static short |
SERVICE_STATE_INITIALIZED
Service state: initialized The service has been initialized and is ready for use. |
static short |
SERVICE_STATE_UNINITIALIZED
Service state: uninitialized The service is unitialized and should not be used. |
Constructor Summary | |
---|---|
ServiceState()
Constructs a default instance. |
|
ServiceState(short serviceState)
Constructs an instance using the specified service state. |
Method Summary | |
---|---|
java.lang.String |
getDescription()
Gets a description of the service state. |
static java.lang.String |
getDescriptionForState(short serviceState)
Gets a description of the specified service state. |
short |
getServiceState()
Gets the current state of the service. |
static boolean |
isStateDeactivated(short serviceState)
Determines whether or not the state of the specified service is SERVICE_STATE_DEACTIVATED . |
static boolean |
isStateInitialized(short serviceState)
Determines whether or not the state of the specified service is SERVICE_STATE_INITIALIZED . |
static boolean |
isStateUninitialized(short serviceState)
Determines whether or not the state of the specified service is SERVICE_STATE_UNINITIALIZED . |
void |
setServiceState(short serviceState)
Sets the state of the service. |
Field Detail |
---|
public static final short SERVICE_STATE_UNINITIALIZED
SERVICE_STATE_INITIALIZED
,
SERVICE_STATE_DEACTIVATED
,
Constant Field Valuespublic static final short SERVICE_STATE_INITIALIZED
SERVICE_STATE_UNINITIALIZED
,
SERVICE_STATE_DEACTIVATED
,
Constant Field Valuespublic static final short SERVICE_STATE_DEACTIVATED
SERVICE_STATE_UNINITIALIZED
,
SERVICE_STATE_INITIALIZED
,
Constant Field ValuesConstructor Detail |
---|
public ServiceState()
public ServiceState(short serviceState) throws ServiceException
serviceState
- Service's state.
ServiceException
- if an invalid state is specified.Method Detail |
---|
public final short getServiceState()
public final void setServiceState(short serviceState) throws ServiceException
serviceState
- Service's state.
ServiceException
- if an invalid service state is specified.public final java.lang.String getDescription()
public static final boolean isStateUninitialized(short serviceState)
SERVICE_STATE_UNINITIALIZED
.
serviceState
- A service state which will be compared for equality to the
uninitialized state.
true
if the service is uninitialized or
false
if it isn't.public static final boolean isStateInitialized(short serviceState)
SERVICE_STATE_INITIALIZED
.
serviceState
- A service state which will be compared for equality to the
initialized state.
true
if the service is initialized or
false
if it isn't.public static final boolean isStateDeactivated(short serviceState)
SERVICE_STATE_DEACTIVATED
.
serviceState
- A service state which will be compared for equality to the
deactivated state.
true
if the service is deactivated or
false
if it isn't.public static final java.lang.String getDescriptionForState(short serviceState) throws java.lang.IllegalArgumentException
serviceState
- The state for which a description is desired.
java.lang.IllegalArgumentException
- if an invalid service state is specified.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |