Package org.jboss.modcluster
Interface ModClusterServiceMBean
- All Known Implementing Classes:
ModClusterListener
,ModClusterListener
,ModClusterService
public interface ModClusterServiceMBean
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a proxy to the list of those with which this handler communicates.boolean
disable()
Disable all webapps for all engines.boolean
disableContext
(String hostName, String contextPath) Disables the webapp with the specified host and context path.boolean
enable()
Enable all webapps for all engines.boolean
enableContext
(String hostName, String contextPath) Enables the webapp with the specified host and context path.Retrieves the full proxy configuration.Retrieves the full proxy info message.ping()
Ping httpd.Ping a node from httpd.Ping a node defined protocol, host and port from httpd.void
refresh()
Refresh configuration.void
removeProxy
(String host, int port) Remove a proxy from the list of those with which this handler communicates.void
reset()
Reset a DOWN connection to the proxy up to ERROR, where the configuration will be refreshed.boolean
Attempts to gracefully stops all web applications, within the specified timeout.boolean
stopContext
(String hostName, String contextPath, long timeout, TimeUnit unit) Attempts to gracefully stops a single web application, within the specified timeout.
-
Method Details
-
addProxy
Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call toMCMPHandler.status()
.- Parameters:
host
- the hostname of the proxy; a string suitable for passing toInetAddress.getByHost(...)
port
- the port on which the proxy listens for MCMP requests
-
removeProxy
Remove a proxy from the list of those with which this handler communicates. Communication does not end until the next call toMCMPHandler.status()
.- Parameters:
host
- the hostname of the proxy; a string suitable for passing toInetAddress.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 aDUMP
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 anINFO
request to all proxies, returning the responses grouped by proxy address.- Returns:
- a map of INFO_RSP responses, grouped by proxy
-
ping
Map<InetSocketAddress,String> 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
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 httpshostname
- name or IP of a the hostport
-- 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
Attempts to gracefully stops all web applications, within the specified timeout.- Disables all contexts
- Waits for all sessions to drain
- 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
Disables the webapp with the specified host and context path.- Parameters:
hostName
- host name of the target webappcontextPath
- context path of the target webapp- Returns:
- true, if all proxies are responding normally, false otherwise
-
enableContext
Enables the webapp with the specified host and context path.- Parameters:
hostName
- host name of the target webappcontextPath
- context path of the target webapp- Returns:
- true, if all proxies are responding normally, false otherwise
-
stopContext
Attempts to gracefully stops a single web application, within the specified timeout.- Disables the specified context
- Waits for all sessions for the specified context to drain
- 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.
-