Package org.jboss.modcluster.config.impl
Class ModClusterConfig
java.lang.Object
org.jboss.modcluster.config.impl.ModClusterConfig
- All Implemented Interfaces:
AdvertiseConfiguration
,BalancerConfiguration
,MCMPHandlerConfiguration
,NodeConfiguration
,SSLConfiguration
- Direct Known Subclasses:
ModClusterListener
public class ModClusterConfig
extends Object
implements BalancerConfiguration, MCMPHandlerConfiguration, NodeConfiguration, SSLConfiguration, AdvertiseConfiguration
Java bean implementing the various configuration interfaces.
- Author:
- Brian Stansberry, Radoslav Husar
-
Field Summary
Fields inherited from interface org.jboss.modcluster.config.AdvertiseConfiguration
DEFAULT_SOCKET_ADDRESS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReceive advertisements from httpd proxies (default is to use advertisements if the proxyList is not set).Multicast-enabledNetworkInterface
to listen for advertisements.Advertise security key.Name of the balancer.Returns a list of contexts that should never be enabled in mod_cluster.boolean
Allows controlling flushing of packets.int
Time to wait before flushing packets.Factory for generating jvm routeIndicates the group of servers to which this node belongs.int
Maximum number of attempts to send the request to the backend server.int
Maximum time on seconds for idle connections the proxy will wait to connect to the node.int
getPing()
Time to wait for a pong answer to a ping.Deprecated.Gets list of proxies as a collection ofProxyConfiguration
s.URL prefix.int
getSmax()
Soft maximum inactive connection count.Configuration of the socket factory, supply SSL socket factory to use SSL to connect to the proxy.int
Connection timeout for communication with the proxy.Certificate encoding algorithm.SSL ciphers.Certificate revocation list.Key alias.SSL keystore.SSL keystore password.Keystore provider.Keystore type.SSL protocol.Truststore algorithm.int
Trust max certificate length.Trust store file.Trust store password.Trust store provider.Trust store type.boolean
Enables sticky sessions.boolean
Return an error when the request cannot be routed to the right node.boolean
Remove session when the request cannot be routed to the right node.long
Returns the number ofMCMPHandlerConfiguration.getStopContextTimeoutUnit()
to wait for pending requests to complete when stopping a context.Returns the unit of time to whichMCMPHandlerConfiguration.getStopContextTimeout()
pertains.int
getTtl()
Maximum time on seconds for idle connections above smax.int
Timeout to wait for an available worker (default is no wait).boolean
Indicates whether or not to automatically enable contexts.boolean
isSsl()
Deprecated.void
setAdvertise
(Boolean advertise) void
setAdvertiseInterface
(InetAddress advertiseInterfaceAddress) void
setAdvertiseInterface
(NetworkInterface advertiseInterface) void
setAdvertiseSecurityKey
(String advertiseSecurityKey) void
void
setAdvertiseThreadFactory
(ThreadFactory advertiseThreadFactory) void
setAutoEnableContexts
(boolean autoEnableContexts) void
setBalancer
(String balancer) void
setExcludedContextsPerHost
(Map<String, Set<String>> excludedContexts) void
setFlushPackets
(boolean flushPackets) void
setFlushWait
(int flushWait) void
setJvmRouteFactory
(JvmRouteFactory jvmRouteFactory) void
setLoadBalancingGroup
(String loadBalancingGroup) void
setMaxAttempts
(int maxAttempts) void
setNodeTimeout
(int nodeTimeout) void
setPing
(int ping) void
setProxies
(Collection<InetSocketAddress> proxies) Deprecated.void
setProxyConfigurations
(Collection<ProxyConfiguration> proxyConfigurations) void
setProxyURL
(String proxyURL) void
setSessionDrainingStrategy
(SessionDrainingStrategy sessionDrainingStrategy) void
setSmax
(int smax) void
setSocketTimeout
(int socketTimeout) void
setSsl
(boolean ssl) void
setSslCertificateEncodingAlgorithm
(String sslCertificateEncodingAlgorithm) void
setSslCiphers
(String sslCiphers) void
setSslCrlFile
(String sslCrlFile) void
setSslKeyAlias
(String sslKeyAlias) void
setSslKeyStore
(String sslKeyStore) void
setSslKeyStorePassword
(String sslKeyStorePassword) void
setSslKeyStoreProvider
(String sslKeyStoreProvider) void
setSslKeyStoreType
(String sslKeyStoreType) void
setSslProtocol
(String sslProtocol) void
setSslTrustAlgorithm
(String sslTrustAlgorithm) void
setSslTrustMaxCertLength
(int sslTrustMaxCertLength) void
setSslTrustStore
(String sslTrustStore) void
setSslTrustStorePassword
(String sslTrustStorePassword) void
setSslTrustStoreProvider
(String sslTrustStoreProvider) void
setSslTrustStoreType
(String sslTrustStoreType) void
setStickySession
(boolean stickySession) void
setStickySessionForce
(boolean stickySessionForce) void
setStickySessionRemove
(boolean stickySessionRemove) void
setStopContextTimeout
(int stopContextTimeout) void
setStopContextTimeoutUnit
(TimeUnit stopContextTimeoutUnit) void
setTtl
(int ttl) void
setWorkerTimeout
(int workerTimeout)
-
Constructor Details
-
ModClusterConfig
public ModClusterConfig()
-
-
Method Details
-
getAdvertise
Description copied from interface:MCMPHandlerConfiguration
Receive advertisements from httpd proxies (default is to use advertisements if the proxyList is not set).- Specified by:
getAdvertise
in interfaceMCMPHandlerConfiguration
-
setAdvertise
-
getAdvertiseSocketAddress
- Specified by:
getAdvertiseSocketAddress
in interfaceAdvertiseConfiguration
-
setAdvertiseSocketAddress
-
getAdvertiseInterface
Description copied from interface:AdvertiseConfiguration
Multicast-enabledNetworkInterface
to listen for advertisements.- Specified by:
getAdvertiseInterface
in interfaceAdvertiseConfiguration
-
setAdvertiseInterface
-
setAdvertiseInterface
-
getAdvertiseSecurityKey
Description copied from interface:AdvertiseConfiguration
Advertise security key.- Specified by:
getAdvertiseSecurityKey
in interfaceAdvertiseConfiguration
-
setAdvertiseSecurityKey
-
getAdvertiseThreadFactory
- Specified by:
getAdvertiseThreadFactory
in interfaceAdvertiseConfiguration
-
setAdvertiseThreadFactory
-
getProxyConfigurations
Description copied from interface:MCMPHandlerConfiguration
Gets list of proxies as a collection ofProxyConfiguration
s.- Specified by:
getProxyConfigurations
in interfaceMCMPHandlerConfiguration
- Returns:
- list of proxies as a collection of
ProxyConfiguration
s
-
setProxyConfigurations
-
getProxies
Deprecated.Description copied from interface:MCMPHandlerConfiguration
Gets list of proxies as a collection ofInetSocketAddress
es.- Specified by:
getProxies
in interfaceMCMPHandlerConfiguration
- Returns:
- list of proxies as a collection of
InetSocketAddress
es
-
setProxies
Deprecated.Since 1.3.1.Final usesetProxyConfigurations(java.util.Collection)
instead. -
getProxyURL
Description copied from interface:MCMPHandlerConfiguration
URL prefix.- Specified by:
getProxyURL
in interfaceMCMPHandlerConfiguration
-
setProxyURL
-
getSocketTimeout
public int getSocketTimeout()Description copied from interface:MCMPHandlerConfiguration
Connection timeout for communication with the proxy.- Specified by:
getSocketTimeout
in interfaceMCMPHandlerConfiguration
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout) -
isSsl
Deprecated.Description copied from interface:MCMPHandlerConfiguration
SSL client cert usage to connect to the proxy.- Specified by:
isSsl
in interfaceMCMPHandlerConfiguration
-
setSsl
public void setSsl(boolean ssl) -
getSocketFactory
Description copied from interface:MCMPHandlerConfiguration
Configuration of the socket factory, supply SSL socket factory to use SSL to connect to the proxy.- Specified by:
getSocketFactory
in interfaceMCMPHandlerConfiguration
-
getExcludedContextsPerHost
Description copied from interface:MCMPHandlerConfiguration
Returns a list of contexts that should never be enabled in mod_cluster. Contexts may be- Specified by:
getExcludedContextsPerHost
in interfaceMCMPHandlerConfiguration
- Returns:
- a comma delimited list of contexts of the form "[host:]context"
-
setExcludedContextsPerHost
-
isAutoEnableContexts
public boolean isAutoEnableContexts()Description copied from interface:MCMPHandlerConfiguration
Indicates whether or not to automatically enable contexts. If false, context will need to be enabled manually.- Specified by:
isAutoEnableContexts
in interfaceMCMPHandlerConfiguration
- Returns:
- true, if contexts should auto-enable, false otherwise.
-
setAutoEnableContexts
public void setAutoEnableContexts(boolean autoEnableContexts) -
getStopContextTimeout
public long getStopContextTimeout()Description copied from interface:MCMPHandlerConfiguration
Returns the number ofMCMPHandlerConfiguration.getStopContextTimeoutUnit()
to wait for pending requests to complete when stopping a context.- Specified by:
getStopContextTimeout
in interfaceMCMPHandlerConfiguration
- Returns:
- timeout in seconds.
-
setStopContextTimeout
public void setStopContextTimeout(int stopContextTimeout) -
getStopContextTimeoutUnit
Description copied from interface:MCMPHandlerConfiguration
Returns the unit of time to whichMCMPHandlerConfiguration.getStopContextTimeout()
pertains.- Specified by:
getStopContextTimeoutUnit
in interfaceMCMPHandlerConfiguration
- Returns:
- a unit of time
-
setStopContextTimeoutUnit
-
getJvmRouteFactory
Description copied from interface:MCMPHandlerConfiguration
Factory for generating jvm route- Specified by:
getJvmRouteFactory
in interfaceMCMPHandlerConfiguration
-
setJvmRouteFactory
-
getSessionDrainingStrategy
- Specified by:
getSessionDrainingStrategy
in interfaceMCMPHandlerConfiguration
-
setSessionDrainingStrategy
-
getSslCiphers
Description copied from interface:SSLConfiguration
SSL ciphers.- Specified by:
getSslCiphers
in interfaceSSLConfiguration
-
setSslCiphers
-
getSslProtocol
Description copied from interface:SSLConfiguration
SSL protocol.- Specified by:
getSslProtocol
in interfaceSSLConfiguration
-
setSslProtocol
-
getSslCertificateEncodingAlgorithm
Description copied from interface:SSLConfiguration
Certificate encoding algorithm.- Specified by:
getSslCertificateEncodingAlgorithm
in interfaceSSLConfiguration
-
setSslCertificateEncodingAlgorithm
-
getSslKeyStore
Description copied from interface:SSLConfiguration
SSL keystore.- Specified by:
getSslKeyStore
in interfaceSSLConfiguration
-
setSslKeyStore
-
getSslKeyStorePassword
Description copied from interface:SSLConfiguration
SSL keystore password.- Specified by:
getSslKeyStorePassword
in interfaceSSLConfiguration
-
setSslKeyStorePassword
-
getSslKeyStoreType
Description copied from interface:SSLConfiguration
Keystore type.- Specified by:
getSslKeyStoreType
in interfaceSSLConfiguration
-
setSslKeyStoreType
-
getSslKeyStoreProvider
Description copied from interface:SSLConfiguration
Keystore provider.- Specified by:
getSslKeyStoreProvider
in interfaceSSLConfiguration
-
setSslKeyStoreProvider
-
getSslTrustAlgorithm
Description copied from interface:SSLConfiguration
Truststore algorithm.- Specified by:
getSslTrustAlgorithm
in interfaceSSLConfiguration
-
setSslTrustAlgorithm
-
getSslKeyAlias
Description copied from interface:SSLConfiguration
Key alias.- Specified by:
getSslKeyAlias
in interfaceSSLConfiguration
-
setSslKeyAlias
-
getSslCrlFile
Description copied from interface:SSLConfiguration
Certificate revocation list.- Specified by:
getSslCrlFile
in interfaceSSLConfiguration
-
setSslCrlFile
-
getSslTrustMaxCertLength
public int getSslTrustMaxCertLength()Description copied from interface:SSLConfiguration
Trust max certificate length.- Specified by:
getSslTrustMaxCertLength
in interfaceSSLConfiguration
-
setSslTrustMaxCertLength
public void setSslTrustMaxCertLength(int sslTrustMaxCertLength) -
getSslTrustStore
Description copied from interface:SSLConfiguration
Trust store file.- Specified by:
getSslTrustStore
in interfaceSSLConfiguration
-
setSslTrustStore
-
getSslTrustStorePassword
Description copied from interface:SSLConfiguration
Trust store password.- Specified by:
getSslTrustStorePassword
in interfaceSSLConfiguration
-
setSslTrustStorePassword
-
getSslTrustStoreType
Description copied from interface:SSLConfiguration
Trust store type.- Specified by:
getSslTrustStoreType
in interfaceSSLConfiguration
-
setSslTrustStoreType
-
getSslTrustStoreProvider
Description copied from interface:SSLConfiguration
Trust store provider.- Specified by:
getSslTrustStoreProvider
in interfaceSSLConfiguration
-
setSslTrustStoreProvider
-
getLoadBalancingGroup
Description copied from interface:NodeConfiguration
Indicates the group of servers to which this node belongs. If defined, mod_cluster will always attempt to failover a given request to a node in the same group as the failed node. This property is equivalent to the mod_jk domain directive.- Specified by:
getLoadBalancingGroup
in interfaceNodeConfiguration
-
setLoadBalancingGroup
-
getFlushPackets
public boolean getFlushPackets()Description copied from interface:NodeConfiguration
Allows controlling flushing of packets.- Specified by:
getFlushPackets
in interfaceNodeConfiguration
-
setFlushPackets
public void setFlushPackets(boolean flushPackets) -
getFlushWait
public int getFlushWait()Description copied from interface:NodeConfiguration
Time to wait before flushing packets.- Specified by:
getFlushWait
in interfaceNodeConfiguration
-
setFlushWait
public void setFlushWait(int flushWait) -
getPing
public int getPing()Description copied from interface:NodeConfiguration
Time to wait for a pong answer to a ping.- Specified by:
getPing
in interfaceNodeConfiguration
-
setPing
public void setPing(int ping) -
getSmax
public int getSmax()Description copied from interface:NodeConfiguration
Soft maximum inactive connection count.- Specified by:
getSmax
in interfaceNodeConfiguration
-
setSmax
public void setSmax(int smax) -
getTtl
public int getTtl()Description copied from interface:NodeConfiguration
Maximum time on seconds for idle connections above smax.- Specified by:
getTtl
in interfaceNodeConfiguration
-
setTtl
public void setTtl(int ttl) -
getNodeTimeout
public int getNodeTimeout()Description copied from interface:NodeConfiguration
Maximum time on seconds for idle connections the proxy will wait to connect to the node.- Specified by:
getNodeTimeout
in interfaceNodeConfiguration
-
setNodeTimeout
public void setNodeTimeout(int nodeTimeout) -
getBalancer
Description copied from interface:NodeConfiguration
Name of the balancer.- Specified by:
getBalancer
in interfaceNodeConfiguration
-
setBalancer
-
getStickySession
public boolean getStickySession()Description copied from interface:BalancerConfiguration
Enables sticky sessions.- Specified by:
getStickySession
in interfaceBalancerConfiguration
-
setStickySession
public void setStickySession(boolean stickySession) -
getStickySessionRemove
public boolean getStickySessionRemove()Description copied from interface:BalancerConfiguration
Remove session when the request cannot be routed to the right node.- Specified by:
getStickySessionRemove
in interfaceBalancerConfiguration
-
setStickySessionRemove
public void setStickySessionRemove(boolean stickySessionRemove) -
getStickySessionForce
public boolean getStickySessionForce()Description copied from interface:BalancerConfiguration
Return an error when the request cannot be routed to the right node.- Specified by:
getStickySessionForce
in interfaceBalancerConfiguration
-
setStickySessionForce
public void setStickySessionForce(boolean stickySessionForce) -
getWorkerTimeout
public int getWorkerTimeout()Description copied from interface:BalancerConfiguration
Timeout to wait for an available worker (default is no wait).- Specified by:
getWorkerTimeout
in interfaceBalancerConfiguration
-
setWorkerTimeout
public void setWorkerTimeout(int workerTimeout) -
getMaxAttempts
public int getMaxAttempts()Description copied from interface:BalancerConfiguration
Maximum number of attempts to send the request to the backend server.- Specified by:
getMaxAttempts
in interfaceBalancerConfiguration
-
setMaxAttempts
public void setMaxAttempts(int maxAttempts)
-
setProxyConfigurations(java.util.Collection)
instead.