com.crystaldecisions.sdk.plugin.desktop.server
Class ServerState

java.lang.Object
  extended by com.crystaldecisions.sdk.plugin.desktop.server.ServerState

public class ServerState
extends java.lang.Object

This class contains constants and methods for representing the current state of a server in an SAP BusinessObjects Enterprise deployment.

See Also:
IServerBase.getState()

Field Summary
static ServerState INVALID
          Specifies that the server is currently in an invalid state due to a configuration error.
static ServerState RUNNING
          Specifies that the server is currently running.
static ServerState STOPPED
          Specifies that the server is currently stopped.
static ServerState WAITING_FOR_RESOURCES
          Specifies that the server is currently waiting for resources.
 
Method Summary
static ServerState fromInteger(int i)
          Returns a server state object that corresponds to the specified integer.
static ServerState fromString(java.lang.String s)
          Returns a server state object that corresponds to the specified string.
 int toInteger()
          Returns the server state as an integer.
 java.lang.String toString()
          Returns the server state as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STOPPED

public static final ServerState STOPPED
Specifies that the server is currently stopped.


RUNNING

public static final ServerState RUNNING
Specifies that the server is currently running.


WAITING_FOR_RESOURCES

public static final ServerState WAITING_FOR_RESOURCES
Specifies that the server is currently waiting for resources. This can occur if the Central Management Server is unavailable.


INVALID

public static final ServerState INVALID
Specifies that the server is currently in an invalid state due to a configuration error.

Method Detail

toString

public java.lang.String toString()
Returns the server state as a string. Possible values are:
RunningThe server is currently running.
StoppedThe server is currently stopped.
WaitingForResourcesThe server is currently waiting for resources. This can occur if the Central Management Server is unavailable.
InvalidThe server is currently in an invalid state due to a configuration error.

Overrides:
toString in class java.lang.Object

fromString

public static ServerState fromString(java.lang.String s)
Returns a server state object that corresponds to the specified string.

Parameters:
s - the server state string. Possible values are:
RunningThe server is currently running.
StoppedThe server is currently stopped.
WaitingForResourcesThe server is currently waiting for resources. This can occur if the Central Management Server is unavailable.
InvalidThe server is currently in an invalid state due to a configuration error.

If you specify a value that is not in this table, this method returns a ServerState object with the Invalid state.

Returns:
ServerState object

fromInteger

public static ServerState fromInteger(int i)
Returns a server state object that corresponds to the specified integer.

Parameters:
i - the server state integer. Possible values are:
0The server is currently stopped.
1The server is currently running.
2The server is currently waiting for resources. This can occur if the Central Management Server is unavailable.
(any other value)The server is currently in an invalid state due to a configuration error.

If you specify a value that is not in this table, this method returns a ServerState object with the Invalid state.

Returns:
ServerState object

toInteger

public int toInteger()
Returns the server state as an integer. Possible values are:
-1The server is currently in an invalid state due to a configuration error.
0The server is currently stopped.
1The server is currently running.
2The server is currently waiting for resources. This can occur if the Central Management Server is unavailable.