org.apache.catalina.cluster.tcp
Class SocketReplicationThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.apache.catalina.cluster.tcp.SocketReplicationThread
All Implemented Interfaces:
ListenCallback, java.lang.Runnable

public class SocketReplicationThread
extends java.lang.Thread
implements ListenCallback

Version:
$Id: SocketReplicationThread.java 939539 2010-04-30 01:31:33Z kkolinko $
Author:
Peter Rossbach FIXME ThreadPooling FIXME Socket timeout

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 boolean isSendAck()
          receiver must be send ack
 void messageDataReceived(ClusterData data)
          This method is invoked on the callback object to notify it that new data has been received from one of the cluster nodes.
 void run()
          read sender messages / is message complete send ack and wait for next message!
 void sendAck()
          send a reply-acknowledgement
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

run

public void run()
read sender messages / is message complete send ack and wait for next message!

Specified by:
run in interface java.lang.Runnable
See Also:
SocketObjectReader.append(byte[],int,int), Runnable.run()

messageDataReceived

public void messageDataReceived(ClusterData data)
Description copied from interface: ListenCallback
This method is invoked on the callback object to notify it that new data has been received from one of the cluster nodes.

Specified by:
messageDataReceived in interface ListenCallback
Parameters:
data - - the message bytes received from the cluster/replication system

isSendAck

public boolean isSendAck()
Description copied from interface: ListenCallback
receiver must be send ack

Specified by:
isSendAck in interface ListenCallback

sendAck

public void sendAck()
             throws java.io.IOException
send a reply-acknowledgement

Specified by:
sendAck in interface ListenCallback
Throws:
java.io.IOException


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.