Interface ServerInstance

  • All Known Subinterfaces:
    IntelligenceServerInstance, PDFExporterServerInstance

    public interface ServerInstance
    The ServerInstance interface represents the properties of a single server instance. It contains methods to modify the state of the server, such as start, stop, and terminate. In addition, it has methods to obtain the status of the instance and the service configuration of the instance. In addition, depending upon the server type, this object can be cast into a type-specific interface; for example, an instance of type EnumServerTypes.IntelligenceServer can be cast into the IntelligenceServerInstance interface to access type-specific methods.

    Also, note that any changes to the specific interface's properties or the ServiceConfiguration interface will not take place until the save method is called. The save method will cause any changes to the instance to be submitted to the server.

    Since:
    MicroStrategy Web 7.5.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ServerLicense getLicense()
      Returns an ServerLicense object which describes the features of the server license
      java.lang.String getName()
      Returns the name of the server instance.
      int getServerType()
      Returns type type of server that the server instance refers to, from EnumServerTypes.
      ServiceConfiguration getServiceConfiguration()
      Returns the service configuration of a ServerInstance object which is registered as a service.
      InstanceStatus getStatus()
      Returns an InstanceStatus object which describes the status of the server instance.
      boolean isService()
      Returns whether the instance is registered as a service on the server machine.
      void pause()
      Attempts to pause the server instance on the server machine.
      void registerService()
      Registers the instance as a service.
      void resume()
      Attempts to resume the server instance on the server machine.
      void save()
      Saves any changes made to either the type-specific properties of this object or the ServiceConfiguration object available from the getServiceConfiguration method.
      void start()
      Attempts to start the server instance on the given server machine.
      void start​(boolean isService)
      Attempts to start the server instance on the given server machine.
      void stop()
      Attempts to stop the server instance on the server machine.
      void terminate()
      Attempts to terminate the server instance on the server machine.
      void unregisterService()
      Unregisters the instance as a service.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns the name of the server instance.
        Returns:
        The name of the server instance.
      • getServerType

        int getServerType()
        Returns type type of server that the server instance refers to, from EnumServerTypes.
        Returns:
        A value from EnumServerTypes which describes the type of server instance.
      • start

        void start()
            throws ServerConfigException
        Attempts to start the server instance on the given server machine. Note that if this method, as opposed to the method containing the isService flag, is called, then the instance will be started as a service if it is registered, or interactively if it is not registered.
        Throws:
        ServerConfigException - Thrown if an error occurs.
      • start

        void start​(boolean isService)
            throws ServerConfigException
        Attempts to start the server instance on the given server machine.
        Parameters:
        isService - Whether to start the instance as a service or interactively.
        Throws:
        ServerConfigException - Thrown if an error occurs.
      • getServiceConfiguration

        ServiceConfiguration getServiceConfiguration()
                                              throws ServerConfigException
        Returns the service configuration of a ServerInstance object which is registered as a service. This method should only be called if the isService method returns true; if it returns false, then this method will fail.
        Returns:
        A ServiceConfiguration object describing the service configuration of the instance.
        Throws:
        ServerConfigException - Thrown if an error occurs when retrieving the service configuration information.
      • isService

        boolean isService()
                   throws ServerConfigException
        Returns whether the instance is registered as a service on the server machine. This is set upon creation of the server instance, and cannot be changed after creation.
        Returns:
        True if the instance is registered as a service, false otherwise.
        Throws:
        ServerConfigException - Thrown if an error occurs when obtaining whether the instance is a service.
      • registerService

        void registerService()
                      throws ServerConfigException
        Registers the instance as a service. Note that this will only work when called on an instance which is not already registered as a service, and will take place immediately.
        Throws:
        ServerConfigException - Thrown if an error occurs.
        Since:
        MicroStrategy Web 7.5.2
      • unregisterService

        void unregisterService()
                        throws ServerConfigException
        Unregisters the instance as a service. Note that this will only work when called on an instance which is already registered as a service, and will take place immediately.
        Throws:
        ServerConfigException - Thrown if an error occurs.
        Since:
        MicroStrategy Web 7.5.2