Interface DomainClient

All Superinterfaces:
AutoCloseable, Closeable, ModelControllerClient
All Known Implementing Classes:
DomainClientImpl

public interface DomainClient extends ModelControllerClient
Client interface used to interact with the domain management infrastructure. THis interface allows clients to get information about the domain as well as apply updates to the domain.
Author:
John Bailey
  • Method Details

    • getHostControllerNames

      List<String> getHostControllerNames()
      Gets the list of currently running host controllers.
      Returns:
      the names of the host controllers. Will not be null
    • addDeploymentContent

      byte[] addDeploymentContent(InputStream stream)
      Add the content for a deployment to the domain controller. Note that the DomainDeploymentManager offers a more convenient API for manipulating domain deployments.
      Parameters:
      stream - the data stream for the deployment
      Returns:
      the unique hash for the deployment
    • getDeploymentManager

      DomainDeploymentManager getDeploymentManager()
      Gets a DomainDeploymentManager that provides a convenience API for manipulating domain deployments.
      Returns:
      the deployment manager. Will not be null
    • getServerStatuses

      Map<ServerIdentity,ServerStatus> getServerStatuses()
      Gets a list of all servers known to the domain, along with their current status. Servers associated with host controllers that are currently off line will not be included.
      Returns:
      the servers and their current status. Will not be null
    • startServer

      ServerStatus startServer(String hostControllerName, String serverName)
      Starts the given server. Ignored if the server is not stopped.
      Parameters:
      hostControllerName - the name of the host controller responsible for the server
      serverName - the name of the server
      Returns:
      the status of the server following the start. Will not be null
    • stopServer

      ServerStatus stopServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
      Stops the given server.
      Parameters:
      hostControllerName - the name of the host controller responsible for the server
      serverName - the name of the server
      gracefulShutdownTimeout - maximum period to wait to allow the server to gracefully handle long running tasks before shutting down, or -1 to shutdown immediately
      timeUnit - time unit in which gracefulShutdownTimeout is expressed
      Returns:
      the status of the server following the stop. Will not be null
    • restartServer

      ServerStatus restartServer(String hostControllerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit)
      Restarts the given server.
      Parameters:
      hostControllerName - the name of the host controller responsible for the server
      serverName - the name of the server
      gracefulShutdownTimeout - maximum period to wait to allow the server to gracefully handle long running tasks before shutting down, or -1 to shutdown immediately
      timeUnit - time unit in which gracefulShutdownTimeout is expressed
      Returns:
      the status of the server following the restart. Will not be null