Package org.apache.catalina.ha.backend
Class HeartbeatListener
java.lang.Object
org.apache.catalina.ha.backend.HeartbeatListener
- All Implemented Interfaces:
- LifecycleListener
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetGroup()getHost()intintgetPort()intgetTtl()voidlifecycleEvent(LifecycleEvent event) Acknowledge the occurrence of the specified event.voidSet the Multicast IP to use for MulticastvoidSet 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(String proxyList) Set the list of Proxies that send is requests, when not empty it toggles the multi to off.voidsetProxyURLString(String proxyURL) Set the URL of receiver in httpd.voidsetTtl(int ttl) Set the TTL for Multicast packets.
- 
Field Details- 
portprotected int port
- 
host
- 
ip
- 
multiportprotected int multiport
- 
ttlprotected int ttl
- 
proxyListProxy list, format "address:port,address:port".
- 
proxyURLURL prefix.
 
- 
- 
Constructor Details- 
HeartbeatListenerpublic HeartbeatListener()
 
- 
- 
Method Details- 
getHost- Returns:
- the host corresponding to the connector we want to proxy.
 
- 
setHostSet 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.
 
- 
getGroup- Returns:
- the Multicast IP we are using for Multicast
 
- 
setGroupSet 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.
 
- 
getProxyList- Returns:
- the list of proxies that send us requests.
 
- 
setProxyListSet 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".
 
- 
getProxyURL- Returns:
- the URL specified in <Location/> for the SetHandler heartbeat.
 
- 
setProxyURLStringSet 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 /
 
- 
lifecycleEventDescription copied from interface:LifecycleListenerAcknowledge the occurrence of the specified event.- Specified by:
- lifecycleEventin interface- LifecycleListener
- Parameters:
- event- LifecycleEvent that has occurred
 
 
-