Interface ServerManager

  • All Known Subinterfaces:
    DomainManager
    All Known Implementing Classes:
    AbstractDomainManager

    public interface ServerManager
    A manager that allows control of the server lifecycle. Note that if this is not associated with a manual mode container operations will fail.
    Author:
    James R. Perkins
    • Method Detail

      • startServer

        void startServer​(String hostName,
                         String serverName)
        Starts the server.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Throws:
        IllegalStateException - if lifecycle operations are not allowed
        RuntimeException - if the start operation fails
      • stopServer

        void stopServer​(String hostName,
                        String serverName)
        Stops the server.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Throws:
        IllegalStateException - if lifecycle operations are not allowed
        RuntimeException - if the stop operation fails
      • isServerStarted

        boolean isServerStarted​(String hostName,
                                String serverName)
        Checks the status of the server and returns true if the server is fully started.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Returns:
        true if the server is fully started, otherwise false
        Throws:
        RuntimeException - if the operation fails
      • restartServer

        void restartServer​(String hostName,
                           String serverName)
        Restarts the server.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Throws:
        IllegalStateException - if lifecycle operations are not allowed
        RuntimeException - if the restart operation fails
      • resumeServer

        void resumeServer​(String hostName,
                          String serverName)
        Resumes this server after being suspended.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Throws:
        IllegalStateException - if lifecycle operations are not allowed
        RuntimeException - if the resume operation fails
      • suspendServer

        void suspendServer​(String hostName,
                           String serverName,
                           int timeout)
        Suspends this server.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        timeout - the timeout for the suspend
        Throws:
        IllegalStateException - if lifecycle operations are not allowed
        RuntimeException - if the suspend operation fails
      • getServerGroupName

        String getServerGroupName​(String hostName,
                                  String serverName)
        The group name this server is associated with this server.
        Parameters:
        hostName - the name of the host the server is on
        serverName - the name of the server
        Returns:
        the group name
        Throws:
        RuntimeException - if the operation fails