Package org.apache.catalina.ha.backend
Class HeartbeatListener
- java.lang.Object
- 
- org.apache.catalina.ha.backend.HeartbeatListener
 
- 
- All Implemented Interfaces:
- LifecycleListener
 
 public class HeartbeatListener extends java.lang.Object implements LifecycleListener 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.Stringhostprotected java.lang.Stringipprotected intmultiportprotected intportprotected java.lang.StringproxyListProxy list, format "address:port,address:port".protected java.lang.StringproxyURLURL prefix.protected intttl
 - 
Constructor SummaryConstructors Constructor Description HeartbeatListener()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetGroup()java.lang.StringgetHost()intgetMultiport()intgetPort()java.lang.StringgetProxyList()java.lang.StringgetProxyURL()intgetTtl()voidlifecycleEvent(LifecycleEvent event)Acknowledge the occurrence of the specified event.voidsetGroup(java.lang.String group)Set the Multicast IP to use for MulticastvoidsetHost(java.lang.String host)Set the host corresponding to the connector.voidsetMultiport(int port)Set the Port to use for MulticastvoidsetPort(int port)Set the port corresponding to the connector.voidsetProxyList(java.lang.String proxyList)Set the list of Proxies that send is requests, when not empty it toggles the multi to off.voidsetProxyURLString(java.lang.String proxyURL)Set the URL of receiver in httpd.voidsetTtl(int ttl)Set the TTL for Multicast packets.
 
- 
- 
- 
Field Detail- 
portprotected int port 
 - 
hostprotected java.lang.String host 
 - 
ipprotected java.lang.String ip 
 - 
multiportprotected int multiport 
 - 
ttlprotected int ttl 
 - 
proxyListprotected java.lang.String proxyList Proxy list, format "address:port,address:port".
 - 
proxyURLprotected java.lang.String proxyURL URL prefix.
 
- 
 - 
Method Detail- 
getHostpublic java.lang.String getHost() - Returns:
- the host corresponding to the connector we want to proxy.
 
 - 
setHostpublic void setHost(java.lang.String host) Set the host corresponding to the connector.- Parameters:
- host- the hostname or ip string.
 
 - 
getPortpublic int getPort() - Returns:
- the port of the connector we want to proxy.
 
 - 
setPortpublic void setPort(int port) Set the port corresponding to the connector.- Parameters:
- port- default 8009 the ajp one.
 
 - 
getGrouppublic java.lang.String getGroup() - Returns:
- the Multicast IP we are using for Multicast
 
 - 
setGrouppublic void setGroup(java.lang.String group) Set the Multicast IP to use for Multicast- Parameters:
- group- the multi address to use.
 
 - 
getMultiportpublic int getMultiport() - Returns:
- the Multicast Port we are using for Multicast.
 
 - 
setMultiportpublic void setMultiport(int port) Set the Port to use for Multicast- Parameters:
- port- the port to use.
 
 - 
getTtlpublic int getTtl() - Returns:
- the TTL for Multicast packets.
 
 - 
setTtlpublic void setTtl(int ttl) Set the TTL for Multicast packets.- Parameters:
- ttl- value for TTL.
 
 - 
getProxyListpublic java.lang.String getProxyList() - Returns:
- the list of proxies that send us requests.
 
 - 
setProxyListpublic void setProxyList(java.lang.String proxyList) Set the list of Proxies that send is requests, when not empty it toggles the multi to off. A SetHandler heartbeat must be existing in httpd.conf.- Parameters:
- proxyList- the list of proxy, format "address:port,address:port".
 
 - 
getProxyURLpublic java.lang.String getProxyURL() - Returns:
- the URL specified in <Location/> for the SetHandler heartbeat.
 
 - 
setProxyURLStringpublic void setProxyURLString(java.lang.String proxyURL) Set the URL of receiver in httpd. That is the location used in<Location "/HeartbeatListener"> SetHandler heartbeat </Location>All proxies MUST use the same location.- Parameters:
- proxyURL- a String with the URL starting with /
 
 - 
lifecycleEventpublic void lifecycleEvent(LifecycleEvent event) Description copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 
- 
 
-