public class ModClusterService extends Object implements ModClusterServiceMBean, ContainerEventHandler, LoadBalanceFactorProvider, MCMPConnectionListener, ContextFilter
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT |
| Modifier | Constructor and Description |
|---|---|
|
ModClusterService(ModClusterConfig config,
LoadBalanceFactorProvider loadBalanceFactorProvider) |
|
ModClusterService(ModClusterConfig config,
LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory) |
|
ModClusterService(ModClusterConfiguration config,
LoadBalanceFactorProvider loadBalanceFactorProvider) |
protected |
ModClusterService(NodeConfiguration nodeConfig,
BalancerConfiguration balancerConfig,
MCMPHandlerConfiguration mcmpConfig,
AdvertiseConfiguration advertiseConfig,
LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory,
MCMPRequestFactory requestFactory,
MCMPResponseParser responseParser,
ResetRequestSource resetRequestSource,
MCMPHandler mcmpHandler,
AdvertiseListenerFactory listenerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Context context) |
void |
addProxy(String host,
int port)
Add a proxy to the list of those with which this handler communicates.
|
protected void |
config(Engine engine)
Configures the specified engine.
|
void |
connectionEstablished(InetAddress localAddress) |
boolean |
disable()
Disable all webapps for all engines.
|
boolean |
disableContext(String host,
String path)
Disables the webapp with the specified host and context path.
|
boolean |
enable()
Enable all webapps for all engines.
|
boolean |
enableContext(String host,
String path)
Enables the webapp with the specified host and context path.
|
protected void |
establishJvmRoute(Engine engine) |
Set<String> |
getExcludedContexts(Host host)
Returns the contexts that will *not* be registered in any proxy for the given host.
|
int |
getLoadBalanceFactor(Engine engine) |
Map<InetSocketAddress,String> |
getProxyConfiguration() |
Map<InetSocketAddress,String> |
getProxyInfo() |
void |
init(Server server)
Triggers the initialization of mod_cluster.
|
boolean |
isAutoEnableContexts()
Indicates when contexts should auto-enable by default.
|
boolean |
isEstablished() |
Map<InetSocketAddress,String> |
ping() |
Map<InetSocketAddress,String> |
ping(String jvmRoute) |
Map<InetSocketAddress,String> |
ping(String scheme,
String host,
int port) |
void |
refresh()
Refresh configuration.
|
void |
remove(Context context) |
protected void |
removeAll(Engine engine)
Sends REMOVE-APP *, if engine was initialized
|
void |
removeProxy(String host,
int port)
Remove a proxy from the list of those with which this handler communicates.
|
void |
reset() |
void |
shutdown()
Triggers the shutdown of mod_cluster.
|
void |
start(Context context) |
void |
start(Server server)
Indicates the servlet container has been started.
|
void |
status(Engine engine) |
void |
stop(Context context) |
boolean |
stop(long timeout,
TimeUnit unit) |
void |
stop(Server server) |
boolean |
stopContext(String host,
String path,
long timeout,
TimeUnit unit) |
public static final int DEFAULT_PORT
public ModClusterService(ModClusterConfiguration config, LoadBalanceFactorProvider loadBalanceFactorProvider)
public ModClusterService(ModClusterConfig config, LoadBalanceFactorProvider loadBalanceFactorProvider)
public ModClusterService(ModClusterConfig config, LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory)
protected ModClusterService(NodeConfiguration nodeConfig, BalancerConfiguration balancerConfig, MCMPHandlerConfiguration mcmpConfig, AdvertiseConfiguration advertiseConfig, LoadBalanceFactorProviderFactory loadBalanceFactorProviderFactory, MCMPRequestFactory requestFactory, MCMPResponseParser responseParser, ResetRequestSource resetRequestSource, MCMPHandler mcmpHandler, AdvertiseListenerFactory listenerFactory)
public void init(Server server)
ContainerEventHandlerContainerEventHandler.start(Server) event.init in interface ContainerEventHandlerserver - a serverorg.jboss.modcluster.ContainerEventHandler#init(java.lang.Object)public Set<String> getExcludedContexts(Host host)
getExcludedContexts in interface ContextFilterorg.jboss.modcluster.mcmp.ContextFilter#getExcludedContexts()public boolean isAutoEnableContexts()
isAutoEnableContexts in interface ContextFilterContextFilter.isAutoEnableContexts()public void shutdown()
ContainerEventHandlerContainerEventHandler.init(Server).shutdown in interface ContainerEventHandlerorg.jboss.modcluster.ContainerEventHandler#shutdown()public void start(Server server)
ContainerEventHandlerstart in interface ContainerEventHandlerserver - the started serverorg.jboss.modcluster.ContainerEventHandler#start(java.lang.Object)public void stop(Server server)
stop in interface ContainerEventHandlerserver - the stopped serverorg.jboss.modcluster.ContainerEventHandler#stop(org.jboss.modcluster.Server)protected void config(Engine engine)
engine - public boolean isEstablished()
isEstablished in interface MCMPConnectionListenerMCMPConnectionListener.isEstablished()public void connectionEstablished(InetAddress localAddress)
connectionEstablished in interface MCMPConnectionListenerMCMPConnectionListener.connectionEstablished(java.net.InetAddress)protected void establishJvmRoute(Engine engine)
public void add(Context context)
add in interface ContainerEventHandlercontext - the added contextorg.jboss.modcluster.ContainerEventHandler#add(org.jboss.modcluster.Context)public void start(Context context)
start in interface ContainerEventHandlercontext - the started contextorg.jboss.modcluster.ContainerEventHandler#start(org.jboss.modcluster.Context)public void stop(Context context)
stop in interface ContainerEventHandlercontext - the stopped contextorg.jboss.modcluster.ContainerEventHandler#stop(org.jboss.modcluster.Context)public void remove(Context context)
remove in interface ContainerEventHandlercontext - the removed contextorg.jboss.modcluster.ContainerEventHandler#remove(org.jboss.modcluster.Context)protected void removeAll(Engine engine)
engine - public void status(Engine engine)
status in interface ContainerEventHandlerengine - the engine to be processedorg.jboss.modcluster.ContainerEventHandler#status(org.jboss.modcluster.Engine)public int getLoadBalanceFactor(Engine engine)
getLoadBalanceFactor in interface LoadBalanceFactorProviderorg.jboss.modcluster.load.LoadBalanceFactorProvider#getLoadBalanceFactor()public void addProxy(String host, int port)
ModClusterServiceMBean#status().addProxy in interface ModClusterServiceMBeanhost - the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)port - the port on which the proxy listens for MCMP requestsModClusterServiceMBean.addProxy(java.lang.String, int)public void removeProxy(String host, int port)
ModClusterServiceMBean#status().removeProxy in interface ModClusterServiceMBeanhost - the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)port - the port on which the proxy listens for MCMP requestsModClusterServiceMBean.removeProxy(java.lang.String, int)public Map<InetSocketAddress,String> getProxyConfiguration()
getProxyConfiguration in interface ModClusterServiceMBeanModClusterServiceMBean.getProxyConfiguration()public Map<InetSocketAddress,String> getProxyInfo()
getProxyInfo in interface ModClusterServiceMBeanModClusterServiceMBean.getProxyInfo()public Map<InetSocketAddress,String> ping()
ping in interface ModClusterServiceMBeanModClusterServiceMBean.ping()public Map<InetSocketAddress,String> ping(String jvmRoute)
ping in interface ModClusterServiceMBeanjvmRoute - a jvm route.ModClusterServiceMBean.ping(java.lang.String)public Map<InetSocketAddress,String> ping(String scheme, String host, int port)
ping in interface ModClusterServiceMBeanscheme - (ajp, http or https)host - (name or ip of a the host)ModClusterServiceMBean.ping(java.lang.String, java.lang.String, int)public void reset()
reset in interface ModClusterServiceMBeanModClusterServiceMBean.reset()public void refresh()
ModClusterServiceMBeanrefresh in interface ModClusterServiceMBeanModClusterServiceMBean.refresh()public boolean disable()
ModClusterServiceMBeandisable in interface ModClusterServiceMBeanModClusterServiceMBean.disable()public boolean enable()
ModClusterServiceMBeanenable in interface ModClusterServiceMBeanModClusterServiceMBean.enable()public boolean disableContext(String host, String path)
ModClusterServiceMBeandisableContext in interface ModClusterServiceMBeanhost - host name of the target webapppath - context path of the target webapporg.jboss.modcluster.ModClusterServiceMBean#disable(java.lang.String, java.lang.String)public boolean enableContext(String host, String path)
ModClusterServiceMBeanenableContext in interface ModClusterServiceMBeanhost - host name of the target webapppath - context path of the target webapporg.jboss.modcluster.ModClusterServiceMBean#enable(java.lang.String, java.lang.String)public boolean stop(long timeout,
TimeUnit unit)
stop in interface ModClusterServiceMBeantimeout - 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 parameterModClusterServiceMBean.stop(long, java.util.concurrent.TimeUnit)public boolean stopContext(String host, String path, long timeout, TimeUnit unit)
stopContext in interface ModClusterServiceMBeantimeout - 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 parameterModClusterServiceMBean.stopContext(java.lang.String, java.lang.String, long,
java.util.concurrent.TimeUnit)Copyright © 2024 JBoss by Red Hat. All rights reserved.