org.apache.catalina.tribes.group.interceptors

Class TcpPingInterceptor

public class TcpPingInterceptor extends ChannelInterceptorBase

Sends a ping to all members. Configure this interceptor with the TcpFailureDetector below it, and the TcpFailureDetector will act as the membership guide.

Version: 1.0

Author: Filip Hanik

Nested Class Summary
protected classTcpPingInterceptor.PingThread
Field Summary
protected static AtomicIntegercnt
protected longinterval
protected static Loglog
protected booleanrunning
protected booleanstaticOnly
protected TcpPingInterceptor.PingThreadthread
protected static byte[]TCP_PING_DATA
protected booleanuseThread
Method Summary
longgetInterval()
booleangetStaticOnly()
booleangetUseThread()
voidheartbeat()
voidmessageReceived(ChannelMessage msg)
protected voidsendPing()
protected voidsendPingMessage(Member[] members)
voidsetInterval(long interval)
voidsetStaticOnly(boolean staticOnly)
voidsetUseThread(boolean useThread)
voidstart(int svc)
voidstop(int svc)

Field Detail

cnt

protected static AtomicInteger cnt

interval

protected long interval

log

protected static Log log

running

protected boolean running

staticOnly

protected boolean staticOnly

thread

protected TcpPingInterceptor.PingThread thread

TCP_PING_DATA

protected static byte[] TCP_PING_DATA

useThread

protected boolean useThread

Method Detail

getInterval

public long getInterval()

getStaticOnly

public boolean getStaticOnly()

getUseThread

public boolean getUseThread()

heartbeat

public void heartbeat()

messageReceived

public void messageReceived(ChannelMessage msg)

sendPing

protected void sendPing()

sendPingMessage

protected void sendPingMessage(Member[] members)

setInterval

public void setInterval(long interval)

setStaticOnly

public void setStaticOnly(boolean staticOnly)

setUseThread

public void setUseThread(boolean useThread)

start

public void start(int svc)

stop

public void stop(int svc)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.