Interface ServerMachine
- 
- All Superinterfaces:
- EnumWebPersistableState,- Persistable
 
 public interface ServerMachine extends Persistable The ServerMachine interface represents one machine with one or more MicroStrategy Server products on it. Note that most of the methods on this interface will work without authentication. The only exception is that the getInstances method will require credentials if the machine is remote.- Since:
- MicroStrategy Web 7.5.0
 
- 
- 
Field Summary- 
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableStateBARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDefaultInstanceName(int serverType)Returns the name of the default instance for the given server type.SimpleListgetInstanceNames(int serverType)Returns the list of instance names of the given type available on the server.ServerInstancesgetInstances(int serverType)Returns the list of server instances of the given type, aServerInstancesobject.InstanceStatusgetInstanceStatus(java.lang.String instanceName, int serverType)Obtains the status of the given instance, and returns aInstanceStatusobject describing that status.SimpleListgetListOfODBCDSNs()Returns the list of ODBC DSNs on the machine.java.lang.StringgetMachineName()Returns the name of the machine.booleanhasCredentials()Returns whether there have been credentials set on this ServerMachine.booleanserverExists(int serverType)Returns whether the given server type exists on the given machine.voidsetCredentials(java.lang.String l, java.lang.String p)Sets the credentials to use for all requests concerning this machine.- 
Methods inherited from interface com.microstrategy.utils.serialization.PersistablerestoreState, restoreState, saveState, saveState, saveState, saveState
 
- 
 
- 
- 
- 
Method Detail- 
getMachineNamejava.lang.String getMachineName() Returns the name of the machine. In the case of a local machine (i.e. if connectLocal was used to obtain the ServerMachine interface), this property will be an empty string.- Returns:
- The name of the machine.
 
 - 
serverExistsboolean serverExists(int serverType) Returns whether the given server type exists on the given machine.- Parameters:
- serverType- The type of server to search for, from- EnumServerTypes.
- Returns:
- True if the given server type exists on the server, false otherwise.
 
 - 
getListOfODBCDSNsSimpleList getListOfODBCDSNs() throws ServerConfigException Returns the list of ODBC DSNs on the machine.- Returns:
- A SimpleListcontaining Strings representing the ODBC DSNs on the machine.
- Throws:
- ServerConfigException- Thrown if an error occurs.
 
 - 
getInstanceNamesSimpleList getInstanceNames(int serverType) throws ServerConfigException Returns the list of instance names of the given type available on the server.- Parameters:
- serverType- The type of server to return the instances for, from- EnumServerTypes.
- Returns:
- A SimpleListobject containing the names of all instances of the given type.
- Throws:
- ServerConfigException- Thrown if an error occurs.
 
 - 
getDefaultInstanceNamejava.lang.String getDefaultInstanceName(int serverType) throws ServerConfigExceptionReturns the name of the default instance for the given server type.- Parameters:
- serverType- The type of server to return the default instance for, from- EnumServerTypes.
- Returns:
- A String, which is the name of the default instance.
- Throws:
- ServerConfigException- Thrown if an error occurs.
 
 - 
getInstanceStatusInstanceStatus getInstanceStatus(java.lang.String instanceName, int serverType) throws ServerConfigException Obtains the status of the given instance, and returns aInstanceStatusobject describing that status.- Parameters:
- instanceName- The name of the instance to retrieve the status for.
- serverType- The type of server instance the status is being retrieved for, from- EnumServerTypes.
- Returns:
- An InstanceStatusobject, which can be used to query the status of the given instance.
- Throws:
- ServerConfigException- Thrown if an error occurs when gathering the status.
 
 - 
getInstancesServerInstances getInstances(int serverType) throws ServerConfigException Returns the list of server instances of the given type, aServerInstancesobject.- Parameters:
- serverType- The type of server instances to return, from- EnumServerTypes.
- Returns:
- A ServerInstancesobject, containing the list of instances of the given type.
- Throws:
- ServerConfigException- Thrown if an error occurs when obtaining the instances.
 
 - 
setCredentialsvoid setCredentials(java.lang.String l, java.lang.String p) throws ServerConfigExceptionSets the credentials to use for all requests concerning this machine.- Parameters:
- l- The login to use for authentication on this machine.
- p- The password to use for authentication on this machine.
- Throws:
- ServerConfigException- Thrown if an error occurs.
 
 - 
hasCredentialsboolean hasCredentials() Returns whether there have been credentials set on this ServerMachine. Certain operations do not require credentials. In addition, if the machine is local, then permissions may not be needed as well.- Returns:
- True if credentials have been set on the machine, false otherwise.
 
 
- 
 
-