public interface

ServerMachine

implements Persistable
com.microstrategy.web.objects.admin.serverconfig.ServerMachine

Class Overview

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.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract String getDefaultInstanceName(int serverType)
Returns the name of the default instance for the given server type.
abstract SimpleList getInstanceNames(int serverType)
Returns the list of instance names of the given type available on the server.
abstract InstanceStatus getInstanceStatus(String instanceName, int serverType)
Obtains the status of the given instance, and returns a InstanceStatus object describing that status.
abstract ServerInstances getInstances(int serverType)
Returns the list of server instances of the given type, a ServerInstances object.
abstract SimpleList getListOfODBCDSNs()
Returns the list of ODBC DSNs on the machine.
abstract String getMachineName()
Returns the name of the machine.
abstract boolean hasCredentials()
Returns whether there have been credentials set on this ServerMachine.
abstract boolean serverExists(int serverType)
Returns whether the given server type exists on the given machine.
abstract void setCredentials(String login, String password)
Sets the credentials to use for all requests concerning this machine.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable

Public Methods

public abstract String getDefaultInstanceName (int serverType)

Returns 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.

public abstract SimpleList getInstanceNames (int serverType)

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 SimpleList object containing the names of all instances of the given type.
Throws
ServerConfigException Thrown if an error occurs.

public abstract InstanceStatus getInstanceStatus (String instanceName, int serverType)

Obtains the status of the given instance, and returns a InstanceStatus object 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 InstanceStatus object, which can be used to query the status of the given instance.
Throws
ServerConfigException Thrown if an error occurs when gathering the status.

public abstract ServerInstances getInstances (int serverType)

Returns the list of server instances of the given type, a ServerInstances object.

Parameters
serverType The type of server instances to return, from EnumServerTypes.
Returns
  • A ServerInstances object, containing the list of instances of the given type.
Throws
ServerConfigException Thrown if an error occurs when obtaining the instances.

public abstract SimpleList getListOfODBCDSNs ()

Returns the list of ODBC DSNs on the machine.

Returns
  • A SimpleList containing Strings representing the ODBC DSNs on the machine.
Throws
ServerConfigException Thrown if an error occurs.

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

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

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

public abstract void setCredentials (String login, String password)

Sets the credentials to use for all requests concerning this machine.

Parameters
login The login to use for authentication on this machine.
password The password to use for authentication on this machine.
Throws
ServerConfigException Thrown if an error occurs.