keepalive.keepalive
Class AreYouThere

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--keepalive.keepalive.KeepAlive
              |
              +--keepalive.keepalive.AreYouThere
All Implemented Interfaces:
java.lang.Runnable

public class AreYouThere
extends KeepAlive

If no incoming messages have been received in a while, the remote application or host may be dead or the connection may have been lost, so send out an Are-You-There. If the connection has been lost, we will get an IOException. If the connection is alive, the Are-You-There serves as a trigger to make the other side send something back. If, despite this, we have received nothing in a long time, then we close the socket.


Fields inherited from class keepalive.keepalive.KeepAlive
ARE_YOU_THERE, endRequested, I_HEAR_YOU, TIME_BETWEEN_ACTIVE_PROBES
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AreYouThere()
          Create a new Keep-Alive object.
AreYouThere(Receiver receiver, Sender sender)
          Create a new Keep-Alive object.
 
Method Summary
 void run()
          Require the subclasses to implement run(), to prevent them from using the run() method in class Thread with a null body.
 
Methods inherited from class keepalive.keepalive.KeepAlive
end, endRequested, getDummyString, getReceiver, getSender, getSilentTimeForIncoming, setReceiver, setSender
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, 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
 

Constructor Detail

AreYouThere

public AreYouThere(Receiver receiver,
                   Sender sender)
Create a new Keep-Alive object.
Parameters:
receiver -  
sender -  

AreYouThere

public AreYouThere()
Create a new Keep-Alive object. Used for dynamic classloading.
Method Detail

run

public void run()
Description copied from class: KeepAlive
Require the subclasses to implement run(), to prevent them from using the run() method in class Thread with a null body.
Overrides:
run in class KeepAlive


© 2000 Joshua Fox