public interface

InstanceStatus

com.microstrategy.web.objects.admin.serverconfig.InstanceStatus
Known Indirect Subclasses

Class Overview

This interface represents the status of a single server instance. This interface can be obtained from either the ServerInstance or ServerMachine interfaces. Note that, based on the server type, this interface can be cast into a type-specific subinterface. For example, an InstanceStatus object with server type EnumServerTypes.IntelligenceServer can be cast to a IntelligenceServerInstanceStatus object, to obtain Intelligence Server-specific information.

Summary

Public Methods
abstract boolean canBePaused()
Returns whether the instance supports pausing from its current state.
abstract String getComputerName()
Returns the computer name that the process last existed on.
abstract int getExecutionMode()
Returns the execution mode of the process, from the enumeration EnumExecutionMode.
abstract int getExitCode()
Returns the exit code for the process the last time the process exited.
abstract String getExitMessage()
Returns the exit message for the process the last time the process exited.
abstract String getProcessCreationTime()
Returns the creation time of the server process corresponding to this instance on the server machine.
abstract int getProcessID()
Returns the ID of the server process corresponding to this instance on the server machine.
abstract int getServerType()
Returns the server type of the instance.
abstract int getState()
Returns the state of the instance.
abstract ServerVersionInfo getVersionInfo()
Returns an interface which can be used to get information about the version of the server instance.
abstract void refresh()
Refreshes the status of the Server Instance.

Public Methods

public abstract boolean canBePaused ()

Returns whether the instance supports pausing from its current state.

Returns
  • True if the instance can be paused, false if not.

public abstract String getComputerName ()

Returns the computer name that the process last existed on.

Returns
  • The name of the machine that the process last existed on.

public abstract int getExecutionMode ()

Returns the execution mode of the process, from the enumeration EnumExecutionMode.

Returns
  • The execution mode of the process.

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

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

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

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

public abstract 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

public abstract int getState ()

Returns the state of the instance. This will be a value from the EnumServerState enumeration.

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
In addition, it is OK to register a service when the instance is in any state. However, a service cannot be unregistered if the state is RUNNING and it is currently running as a service.

Returns
  • The current known state of the server instance.

public abstract ServerVersionInfo getVersionInfo ()

Returns an interface which can be used to get information about the version of the server instance.

Returns

public abstract void refresh ()

Refreshes the status of the Server Instance.

Throws
ServerConfigException Thrown if an error occurs when refreshing the status.