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 TypeMethodDescriptionvoid
addProxy
(InetSocketAddress socketAddress) Deprecated.void
addProxy
(InetSocketAddress socketAddress, boolean established) void
addProxy
(ProxyConfiguration proxyConfiguration) Add a proxy to the list of those with which this handler communicates.void
addProxy
(ProxyConfiguration proxyConfiguration, boolean established) Add a proxy to the list of those with which this handler communicates.Get the state of all proxiesvoid
init
(Collection<ProxyConfiguration> initialProxies, MCMPConnectionListener connectionListener) Initialization method for MCMP handler.boolean
Convenience method that checks whether the status of all proxies isOK
.void
void
removeProxy
(InetSocketAddress socketAddress) Remove a proxy from the list of those with which this handler communicates.void
reset()
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.void
shutdown()
Perform any shut down work.void
status()
Perform periodic processing.
-
Method Details
-
init
Initialization method for MCMP handler.- Parameters:
initialProxies
- a collection of initialProxyConfiguration
sconnectionListener
- 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
-ProxyConfiguration
defining 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
-true
if the proxy should be consideredestablished
,false
otherwise.
-
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
-ProxyConfiguration
defining address on which the proxy listens for MCMP requests and optional local address to bind connections toestablished
-true
if the proxy should be consideredestablished
,false
otherwise.
-
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:
true
if all proxies areOK
,false
otherwise
-
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 aResetRequestSource
has been provided, update the proxy with the list of requests provided by the source.
-
addProxy(org.jboss.modcluster.config.ProxyConfiguration)