Interface ServerInstances

  • All Known Subinterfaces:
    IntelligenceServerInstances

    public interface 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.
    Since:
    MicroStrategy Web 7.5.0
    • Method Detail

      • getServerType

        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.
      • get

        ServerInstance get​(int i)
                    throws java.lang.IndexOutOfBoundsException
        Returns the ServerInstance object at the given index in the collection.
        Parameters:
        i - The index of the item in the collection to obtain.
        Returns:
        The ServerInstance object at the given index.
        Throws:
        java.lang.IndexOutOfBoundsException - Thrown if an invalid index is given.
      • getItemByName

        ServerInstance getItemByName​(java.lang.String name)
                              throws java.lang.IllegalArgumentException
        Returns the ServerInstance object with the given name, if one exists.
        Parameters:
        name - The name of the instance to return.
        Returns:
        A ServerInstance object with the given name.
        Throws:
        java.lang.IllegalArgumentException - Thrown if no object with the given name exists.
      • size

        int size()
        Returns the number of objects in the collection.
        Returns:
        The size of the collection.
      • elements

        java.util.Enumeration elements()
        Returns a java.util.Enumeration which can be used to iterate through the list of ServerInstance objects.
        Returns:
        A java.util.Enumeration object containing ServerInstance objects.
      • isEmpty

        boolean isEmpty()
        Returns whether the collection is empty or not.
        Returns:
        True if the collection is empty, false otherwise.
      • add

        ServerInstance add​(java.lang.String name)
                    throws ServerConfigException,
                           java.lang.IllegalArgumentException
        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:
        The newly created ServerInstance object.
        Throws:
        ServerConfigException - Thrown if an error occurs when creating the instance.
        java.lang.IllegalArgumentException - Thrown if an instance with the given name already exists.
      • remove

        void remove​(int i)
             throws ServerConfigException,
                    java.lang.IndexOutOfBoundsException
        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.
        java.lang.IndexOutOfBoundsException - Thrown if the index is invalid.