Interface ServerInstance
-
- All Known Subinterfaces:
IntelligenceServerInstance,PDFExporterServerInstance
public interface ServerInstanceThe ServerInstance interface represents the properties of a single server instance. It contains methods to modify the state of the server, such as start, stop, and terminate. In addition, it has methods to obtain the status of the instance and the service configuration of the instance. In addition, depending upon the server type, this object can be cast into a type-specific interface; for example, an instance of typeEnumServerTypes.IntelligenceServer can be cast into the IntelligenceServerInstance interface to access type-specific methods.Also, note that any changes to the specific interface's properties or the ServiceConfiguration interface will not take place until the save method is called. The save method will cause any changes to the instance to be submitted to the server.
- Since:
- MicroStrategy Web 7.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerLicensegetLicense()Returns anServerLicenseobject which describes the features of the server licensejava.lang.StringgetName()Returns the name of the server instance.intgetServerType()Returns type type of server that the server instance refers to, fromEnumServerTypes.ServiceConfigurationgetServiceConfiguration()Returns the service configuration of a ServerInstance object which is registered as a service.InstanceStatusgetStatus()Returns anInstanceStatusobject which describes the status of the server instance.booleanisService()Returns whether the instance is registered as a service on the server machine.voidpause()Attempts to pause the server instance on the server machine.voidregisterService()Registers the instance as a service.voidresume()Attempts to resume the server instance on the server machine.voidsave()Saves any changes made to either the type-specific properties of this object or theServiceConfigurationobject available from the getServiceConfiguration method.voidstart()Attempts to start the server instance on the given server machine.voidstart(boolean isService)Attempts to start the server instance on the given server machine.voidstop()Attempts to stop the server instance on the server machine.voidterminate()Attempts to terminate the server instance on the server machine.voidunregisterService()Unregisters the instance as a service.
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the server instance.- Returns:
- The name of the server instance.
-
getServerType
int getServerType()
Returns type type of server that the server instance refers to, fromEnumServerTypes.- Returns:
- A value from
EnumServerTypeswhich describes the type of server instance.
-
getLicense
ServerLicense getLicense() throws ServerConfigException
Returns anServerLicenseobject which describes the features of the server license- Returns:
- A value from
ServerLicensewhich describes the features of the server license - Throws:
ServerConfigException- Since:
- MicroStrategy Web 9.0.0
-
save
void save() throws ServerConfigException
Saves any changes made to either the type-specific properties of this object or theServiceConfigurationobject available from the getServiceConfiguration method.- Throws:
ServerConfigException- Thrown if an error occurs when saving the changes.
-
start
void start() throws ServerConfigExceptionAttempts to start the server instance on the given server machine. Note that if this method, as opposed to the method containing the isService flag, is called, then the instance will be started as a service if it is registered, or interactively if it is not registered.- Throws:
ServerConfigException- Thrown if an error occurs.
-
start
void start(boolean isService) throws ServerConfigExceptionAttempts to start the server instance on the given server machine.- Parameters:
isService- Whether to start the instance as a service or interactively.- Throws:
ServerConfigException- Thrown if an error occurs.
-
stop
void stop() throws ServerConfigException
Attempts to stop the server instance on the server machine.- Throws:
ServerConfigException- Thrown if an error occurs.
-
pause
void pause() throws ServerConfigExceptionAttempts to pause the server instance on the server machine.- Throws:
ServerConfigException- Thrown if an error occurs.
-
resume
void resume() throws ServerConfigExceptionAttempts to resume the server instance on the server machine.- Throws:
ServerConfigException- Thrown if an error occurs.
-
terminate
void terminate() throws ServerConfigExceptionAttempts to terminate the server instance on the server machine.- Throws:
ServerConfigException- Thrown if an error occurs.
-
getServiceConfiguration
ServiceConfiguration getServiceConfiguration() throws ServerConfigException
Returns the service configuration of a ServerInstance object which is registered as a service. This method should only be called if the isService method returns true; if it returns false, then this method will fail.- Returns:
- A
ServiceConfigurationobject describing the service configuration of the instance. - Throws:
ServerConfigException- Thrown if an error occurs when retrieving the service configuration information.
-
getStatus
InstanceStatus getStatus() throws ServerConfigException
Returns anInstanceStatusobject which describes the status of the server instance.- Returns:
- A
InstanceStatusobject describing the instance status. - Throws:
ServerConfigException- Thrown if the status cannot be obtained.
-
isService
boolean isService() throws ServerConfigExceptionReturns whether the instance is registered as a service on the server machine. This is set upon creation of the server instance, and cannot be changed after creation.- Returns:
- True if the instance is registered as a service, false otherwise.
- Throws:
ServerConfigException- Thrown if an error occurs when obtaining whether the instance is a service.
-
registerService
void registerService() throws ServerConfigExceptionRegisters the instance as a service. Note that this will only work when called on an instance which is not already registered as a service, and will take place immediately.- Throws:
ServerConfigException- Thrown if an error occurs.- Since:
- MicroStrategy Web 7.5.2
-
unregisterService
void unregisterService() throws ServerConfigExceptionUnregisters the instance as a service. Note that this will only work when called on an instance which is already registered as a service, and will take place immediately.- Throws:
ServerConfigException- Thrown if an error occurs.- Since:
- MicroStrategy Web 7.5.2
-
-