com.microstrategy.web.objects.admin.serverconfig.ServerInstances |
![]() |
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.
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(ServerInstance inst)
Deletes the given
ServerInstance object from the collection. | ||||||||||
abstract void |
remove(int i)
Deletes the
ServerInstance object at the given index in 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.
|
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
.
name | The name of the newly created object. |
---|
ServerInstance
object.ServerConfigException | Thrown if an error occurs when creating the instance. |
---|---|
IllegalArgumentException | Thrown if an instance with the given name already exists. |
Creates a copy of a ServerInstance object with a new name, and returns the newly created object.
source | The ServerInstance object to copy. |
---|---|
destName | The name of the copy of the object. |
ServerInstance
objectServerConfigException | Thrown if the operation fails. |
---|
Returns a java.util.Enumeration which can be used to iterate through the list of ServerInstance
objects.
ServerInstance
objects.
Returns the ServerInstance
object at the given index in the collection.
i | The index of the item in the collection to obtain. |
---|
ServerInstance
object at the given index.IndexOutOfBoundsException | Thrown if an invalid index is given. |
---|
Returns the default server instance.
ServerInstance
object.ServerConfigException | Thrown if an error occurs when obtaining the default object. |
---|
Returns the ServerInstance
object with the given name, if one exists.
name | The name of the instance to return. |
---|
ServerInstance
object with the given name.IllegalArgumentException | Thrown if no object with the given name exists. |
---|
Returns the server type that this collection of instances refers to.
EnumServerTypes
corresponding to the server type
of the instances in the collection.
Returns whether the collection is empty or not.
Deletes the given ServerInstance
object from the collection.
inst | The ServerInstance object to remove from the collection and
delete permanently from the server. |
---|
ServerConfigException | Thrown if the operation fails. |
---|
Deletes the ServerInstance
object at the given index in the collection.
i | The index of the object to remove from the list of server instances. |
---|
ServerConfigException | Thrown if the operation fails. |
---|---|
IndexOutOfBoundsException | Thrown if the index is invalid. |
Sets the ServerInstance
object which is designated as the default one
on the server.
inst | The ServerInstance object to designate as the default. |
---|
ServerConfigException | Thrown if the operation fails. |
---|
Returns the number of objects in the collection.