Package org.jboss.modcluster.mcmp
Interface MCMPHandler
-
- All Known Implementing Classes:
DefaultMCMPHandler
public interface MCMPHandlerHandles communication via MCMP with the reverse proxy side.- Author:
- Brian Stansberry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddProxy(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.Set<MCMPServerState>getProxyStates()Get the state of all proxiesvoidinit(Collection<ProxyConfiguration> initialProxies, MCMPConnectionListener connectionListener)Initialization method for MCMP handler.booleanisProxyHealthOK()Convenience method that checks whether the status of all proxies isOK.voidmarkProxiesInError()voidremoveProxy(InetSocketAddress socketAddress)Remove a proxy from the list of those with which this handler communicates.voidreset()Map<MCMPServerState,String>sendRequest(MCMPRequest request)Send a request to all healthy proxies.Map<MCMPServerState,List<String>>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 Detail
-
init
void init(Collection<ProxyConfiguration> initialProxies, MCMPConnectionListener connectionListener)
Initialization method for MCMP handler.- Parameters:
initialProxies- a collection of initialProxyConfigurationsconnectionListener- connection listener
-
shutdown
void shutdown()
Perform any shut down work.
-
sendRequest
Map<MCMPServerState,String> sendRequest(MCMPRequest request)
Send a request to all healthy proxies.- Parameters:
request- the request. Cannot benull
-
sendRequests
Map<MCMPServerState,List<String>> 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.- Parameters:
requests- the requests. Cannot benull
-
addProxy
@Deprecated void addProxy(InetSocketAddress socketAddress)
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
void addProxy(ProxyConfiguration proxyConfiguration)
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
@Deprecated void addProxy(InetSocketAddress socketAddress, boolean established)
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
void addProxy(ProxyConfiguration proxyConfiguration, boolean established)
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
void removeProxy(InetSocketAddress socketAddress)
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.
-
-