public interface

ServerInstances

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

Class Overview

The ServerInstances interface represents a list of ServerInstance objects. This interface contains methods to add, remove, and retrieve instances, along with methods to set and get the default server instances.

Summary

Public Methods
abstract ServerInstance add(String name)
Creates a new ServerInstance object with the given name.
abstract ServerInstance copy(ServerInstance source, String destName)
Creates a copy of a ServerInstance object with a new name, and returns the newly created object.
abstract Enumeration elements()
Returns a java.util.Enumeration which can be used to iterate through the list of ServerInstance objects.
abstract ServerInstance get(int i)
Returns the ServerInstance object at the given index in the collection.
abstract ServerInstance getDefault()
Returns the default server instance.
abstract ServerInstance getItemByName(String name)
Returns the ServerInstance object with the given name, if one exists.
abstract int getServerType()
Returns the server type that this collection of instances refers to.
abstract boolean isEmpty()
Returns whether the collection is empty or not.
abstract void remove(int i)
Deletes the ServerInstance object at the given index in the collection.
abstract void remove(ServerInstance inst)
Deletes the given ServerInstance object from the collection.
abstract void setDefault(ServerInstance inst)
Sets the ServerInstance object which is designated as the default one on the server.
abstract int size()
Returns the number of objects in the collection.

Public Methods

public abstract ServerInstance add (String name)

Creates a new ServerInstance object with the given name. The newly created object will be returned from this method. Note that the newly created instance will not be registered as a service - to do that, call the registerService method on ServerInstance.

Parameters
name The name of the newly created object.
Returns
Throws
ServerConfigException Thrown if an error occurs when creating the instance.
IllegalArgumentException Thrown if an instance with the given name already exists.

public abstract ServerInstance copy (ServerInstance source, String destName)

Creates a copy of a ServerInstance object with a new name, and returns the newly created object.

Parameters
source The ServerInstance object to copy.
destName The name of the copy of the object.
Returns
Throws
ServerConfigException Thrown if the operation fails.

public abstract Enumeration elements ()

Returns a java.util.Enumeration which can be used to iterate through the list of ServerInstance objects.

Returns

public abstract ServerInstance get (int i)

Returns the ServerInstance object at the given index in the collection.

Parameters
i The index of the item in the collection to obtain.
Returns
Throws
IndexOutOfBoundsException Thrown if an invalid index is given.

public abstract ServerInstance getDefault ()

Returns the default server instance.

Returns
Throws
ServerConfigException Thrown if an error occurs when obtaining the default object.

public abstract ServerInstance getItemByName (String name)

Returns the ServerInstance object with the given name, if one exists.

Parameters
name The name of the instance to return.
Returns
Throws
IllegalArgumentException Thrown if no object with the given name exists.

public abstract int getServerType ()

Returns the server type that this collection of instances refers to.

Returns
  • A value from EnumServerTypes corresponding to the server type of the instances in the collection.

public abstract boolean isEmpty ()

Returns whether the collection is empty or not.

Returns
  • True if the collection is empty, false otherwise.

public abstract void remove (int i)

Deletes the ServerInstance object at the given index in the collection.

Parameters
i The index of the object to remove from the list of server instances.
Throws
ServerConfigException Thrown if the operation fails.
IndexOutOfBoundsException Thrown if the index is invalid.

public abstract void remove (ServerInstance inst)

Deletes the given ServerInstance object from the collection.

Parameters
inst The ServerInstance object to remove from the collection and delete permanently from the server.
Throws
ServerConfigException Thrown if the operation fails.

public abstract void setDefault (ServerInstance inst)

Sets the ServerInstance object which is designated as the default one on the server.

Parameters
inst The ServerInstance object to designate as the default.
Throws
ServerConfigException Thrown if the operation fails.

public abstract int size ()

Returns the number of objects in the collection.

Returns
  • The size of the collection.