Interface InstanceStatus
-
- All Known Subinterfaces:
IntelligenceServerInstanceStatus
public interface InstanceStatusThis interface represents the status of a single server instance. This interface can be obtained from either theServerInstanceorServerMachineinterfaces. Note that, based on the server type, this interface can be cast into a type-specific subinterface. For example, an InstanceStatus object with server typeEnumServerTypes.IntelligenceServer can be cast to aIntelligenceServerInstanceStatusobject, to obtain Intelligence Server-specific information.- Since:
- MicroStrategy Web 7.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanBePaused()Returns whether the instance supports pausing from its current state.java.lang.StringgetComputerName()Returns the computer name that the process last existed on.intgetExecutionMode()Returns the execution mode of the process, from the enumerationEnumExecutionMode.intgetExitCode()Returns the exit code for the process the last time the process exited.java.lang.StringgetExitMessage()Returns the exit message for the process the last time the process exited.java.lang.StringgetProcessCreationTime()Returns the creation time of the server process corresponding to this instance on the server machine.intgetProcessID()Returns the ID of the server process corresponding to this instance on the server machine.intgetServerType()Returns the server type of the instance.intgetState()Returns the state of the instance.ServerVersionInfogetVersionInfo()Returns an interface which can be used to get information about the version of the server instance.voidrefresh()Refreshes the status of the Server Instance.
-
-
-
Method Detail
-
getState
int getState()
Returns the state of the instance. This will be a value from theEnumServerStateenumeration.The state of a server determines the operations which can be performed on it.
- It is OK to STOP an instance from the following states:
- RUNNING
- PAUSED
- It is OK to START an instance from the following states:
- STOPPED
- UNLOADING
- TERMINATED
- It is OK to PAUSE an instance from the following states:
- RUNNING(if canBePaused() returns true)
- It is OK to RESUME an instance from the following states:
- PAUSED
- It is OK to DELETE an instance from the following states:
- STOPPED
- TERMINATED
- It is OK to TERMINATE an instance from the following states:
- STARTING
- RUNNING
- STOPPING
- PAUSING
- PAUSED
- RESUMING
- Returns:
- The current known state of the server instance.
- It is OK to STOP an instance from the following states:
-
getProcessID
int getProcessID()
Returns the ID of the server process corresponding to this instance on the server machine. If processExists returns false, the value from this method will be meaningless.- Returns:
- The ID of the server process.
-
getComputerName
java.lang.String getComputerName()
Returns the computer name that the process last existed on.- Returns:
- The name of the machine that the process last existed on.
- Since:
- MicroStrategy Web 7.5.2
-
getExitCode
int getExitCode()
Returns the exit code for the process the last time the process exited. Note that if the server is currently running, then this will be 0.- Returns:
- The exit code for the process.
- Since:
- MicroStrategy Web 7.5.2
-
getExitMessage
java.lang.String getExitMessage()
Returns the exit message for the process the last time the process exited. Note that if the server is currently running, then this will be empty.- Returns:
- The exit message for the process.
- Since:
- MicroStrategy Web 7.5.2
-
getProcessCreationTime
java.lang.String getProcessCreationTime()
Returns the creation time of the server process corresponding to this instance on the server machine. If processExists returns false, this value will not be meaningful.- Returns:
- The process creation time of the server process.
-
getExecutionMode
int getExecutionMode()
Returns the execution mode of the process, from the enumerationEnumExecutionMode.- Returns:
- The execution mode of the process.
-
getServerType
int getServerType()
Returns the server type of the instance. This is primarily useful as a guide to what interfaces this object can be cast to.- Returns:
- The type of server the instance refers to, from
EnumServerTypes.
-
canBePaused
boolean canBePaused()
Returns whether the instance supports pausing from its current state.- Returns:
- True if the instance can be paused, false if not.
-
refresh
void refresh() throws ServerConfigExceptionRefreshes the status of the Server Instance.- Throws:
ServerConfigException- Thrown if an error occurs when refreshing the status.
-
getVersionInfo
ServerVersionInfo getVersionInfo()
Returns an interface which can be used to get information about the version of the server instance.- Returns:
- A
ServerVersionInfoobject which can be used to obtain version information. - Since:
- MicroStrategy Web 7.5.2
-
-