Interface ModClusterServiceMBean

All Known Implementing Classes:
ModClusterListener, ModClusterListener, ModClusterService

public interface ModClusterServiceMBean
Author:
Paul Ferraro
  • Method Details

    • addProxy

      void addProxy(String host, int port)
      Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call to MCMPHandler.status().
      Parameters:
      host - the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)
      port - the port on which the proxy listens for MCMP requests
    • removeProxy

      void removeProxy(String host, int port)
      Remove a proxy from the list of those with which this handler communicates. Communication does not end until the next call to MCMPHandler.status().
      Parameters:
      host - the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)
      port - the port on which the proxy listens for MCMP requests
    • getProxyConfiguration

      Map<InetSocketAddress,String> getProxyConfiguration()
      Retrieves the full proxy configuration. response: node: [1:1] JVMRoute: node1 Domain: [bla] Host: 127.0.0.1 Port: 8009 Type: ajp host: 1 [] vhost: 1 node: 1 context: 1 [/] vhost: 1 node: 1 status: 1 context: 2 [/myapp] vhost: 1 node: 1 status: 1 context: 3 [/host-manager] vhost: 1 node: 1 status: 1 context: 4 [/docs] vhost: 1 node: 1 status: 1 context: 5 [/manager] vhost: 1 node: 1 status: 1 Sends a DUMP request to all proxies, returning the responses grouped by proxy address.
      Returns:
      a map of DUMP_RSP responses, grouped by proxy
    • getProxyInfo

      Map<InetSocketAddress,String> getProxyInfo()
      Retrieves the full proxy info message. Sends an INFO request to all proxies, returning the responses grouped by proxy address.
      Returns:
      a map of INFO_RSP responses, grouped by proxy
    • ping

      Ping httpd. determines whether each proxy is accessible and healthy. returning the PING_RSP grouped by proxy address.
      Returns:
      a map of PING_RSP responses, grouped by proxy
    • ping

      Ping a node from httpd. returning the PING_RSP grouped by proxy address. determines whether the node configured with the specified jvm route is accessible from each proxy returning the PING_RSP grouped by proxy address.
      Parameters:
      jvmRoute - a jvm route.
      Returns:
      a map of PING_RSP responses, grouped by proxy
    • ping

      Map<InetSocketAddress,String> ping(String scheme, String hostname, int port)
      Ping a node defined protocol, host and port from httpd. determines whether a node (not necessarily configured) with the matching connector is accessible from each proxy
      Parameters:
      scheme - ajp, http or https
      hostname - name or IP of a the host
      port -
      Returns:
      a map of PING_RSP responses, grouped by proxy
    • reset

      void reset()
      Reset a DOWN connection to the proxy up to ERROR, where the configuration will be refreshed.
    • refresh

      void refresh()
      Refresh configuration.
    • disable

      boolean disable()
      Disable all webapps for all engines.
      Returns:
      true, if all proxies are responding normally, false otherwise
    • enable

      boolean enable()
      Enable all webapps for all engines.
      Returns:
      true, if all proxies are responding normally, false otherwise
    • stop

      boolean stop(long timeout, TimeUnit unit)
      Attempts to gracefully stops all web applications, within the specified timeout.
      1. Disables all contexts
      2. Waits for all sessions to drain
      3. Stops all contexts
      Parameters:
      timeout - number of units of time for which to wait for sessions to drain. Negative or zero timeout value will wait forever.
      unit - unit of time represented in timeout parameter
      Returns:
      true, if all contexts stopped successfully, false if sessions fail to drain before specified timeout.
    • disableContext

      boolean disableContext(String hostName, String contextPath)
      Disables the webapp with the specified host and context path.
      Parameters:
      hostName - host name of the target webapp
      contextPath - context path of the target webapp
      Returns:
      true, if all proxies are responding normally, false otherwise
    • enableContext

      boolean enableContext(String hostName, String contextPath)
      Enables the webapp with the specified host and context path.
      Parameters:
      hostName - host name of the target webapp
      contextPath - context path of the target webapp
      Returns:
      true, if all proxies are responding normally, false otherwise
    • stopContext

      boolean stopContext(String hostName, String contextPath, long timeout, TimeUnit unit)
      Attempts to gracefully stops a single web application, within the specified timeout.
      1. Disables the specified context
      2. Waits for all sessions for the specified context to drain
      3. Stops the specified context
      Parameters:
      timeout - number of units of time for which to wait for sessions to drain. Negative or zero timeout value will wait forever.
      unit - unit of time represented in timeout parameter
      Returns:
      true, if the specified context was stopped successfully, false if sessions fail to drain before specified timeout.