Package org.jboss.modcluster.mcmp
Interface MCMPHandler
- All Known Implementing Classes:
DefaultMCMPHandler
public interface MCMPHandler
Handles communication via MCMP with the reverse proxy side.
- Author:
- Brian Stansberry
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddProxy(InetSocketAddress socketAddress) Deprecated.voidaddProxy(InetSocketAddress socketAddress, boolean established) voidaddProxy(ProxyConfiguration proxyConfiguration) Add a proxy to the list of those with which this handler communicates.voidaddProxy(ProxyConfiguration proxyConfiguration, boolean established) Add a proxy to the list of those with which this handler communicates.Get the state of all proxiesvoidinit(Collection<ProxyConfiguration> initialProxies, MCMPConnectionListener connectionListener) Initialization method for MCMP handler.booleanConvenience method that checks whether the status of all proxies isOK.voidvoidremoveProxy(InetSocketAddress socketAddress) Remove a proxy from the list of those with which this handler communicates.voidreset()sendRequest(MCMPRequest request) Send a request to all healthy proxies.sendRequests(List<MCMPRequest> requests) Send a list of requests to all healthy proxies, with all requests in the list sent to each proxy before moving on to the next.voidshutdown()Perform any shut down work.voidstatus()Perform periodic processing.
-
Method Details
-
init
Initialization method for MCMP handler.- Parameters:
initialProxies- a collection of initialProxyConfigurationsconnectionListener- connection listener
-
shutdown
void shutdown()Perform any shut down work. -
sendRequest
Send a request to all healthy proxies.- Parameters:
request- the request. Cannot benull
-
sendRequests
Send a list of requests to all healthy proxies, with all requests in the list sent to each proxy before moving on to the next.- Parameters:
requests- the requests. Cannot benull
-
addProxy
Deprecated.Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call tostatus().Same as
addProxy(address, false.- Parameters:
socketAddress- InetSocketAddress on which the proxy listens for MCMP requests
-
addProxy
Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call tostatus().Same as
addProxy(proxyConfiguration, false).- Parameters:
proxyConfiguration-ProxyConfigurationdefining address on which the proxy listens for MCMP requests and optional local address to bind connections to
-
addProxy
Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call tostatus().- Parameters:
socketAddress- InetSocketAddress on which the proxy listens for MCMP requestsestablished-trueif the proxy should be consideredestablished,falseotherwise.
-
addProxy
Add a proxy to the list of those with which this handler communicates. Communication does not begin until the next call tostatus().- Parameters:
proxyConfiguration-ProxyConfigurationdefining address on which the proxy listens for MCMP requests and optional local address to bind connections toestablished-trueif the proxy should be consideredestablished,falseotherwise.
-
removeProxy
Remove a proxy from the list of those with which this handler communicates. Communication does not end until the next call tostatus().- Parameters:
socketAddress- InetSocketAddress on which the proxy listens for MCMP requests
-
getProxyStates
Set<MCMPServerState> getProxyStates()Get the state of all proxies- Returns:
- a set of status objects indicating the status of this handler's communication with all proxies.
-
reset
void reset() -
markProxiesInError
void markProxiesInError() -
isProxyHealthOK
boolean isProxyHealthOK()Convenience method that checks whether the status of all proxies isOK.- Returns:
trueif all proxies areOK,falseotherwise
-
status
void status()Perform periodic processing. Update the list of proxies to reflect any calls toaddProxy(...)orremoveProxy(...). Attempt to establish communication with any proxies whose state isERROR. If successful and aResetRequestSourcehas been provided, update the proxy with the list of requests provided by the source.
-
addProxy(org.jboss.modcluster.config.ProxyConfiguration)