HTTPClient
Class SocketTimeout

java.lang.Object
  extended byjava.lang.Thread
      extended byHTTPClient.SocketTimeout
All Implemented Interfaces:
Runnable

class SocketTimeout
extends Thread

This thread is used to reap idle connections. It is NOT used to timeout reads or writes on a socket. It keeps a list of timer entries and expires them after a given time.


Nested Class Summary
(package private)  class SocketTimeout.TimeoutEntry
          This class represents a timer entry.
 
Field Summary
(package private)  int current
           
(package private)  SocketTimeout.TimeoutEntry[] time_list
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) SocketTimeout(int secs)
           
 
Method Summary
 void kill()
          Stop the timer thread.
 void run()
          This timer is implemented by sleeping for 1 second and then checking the timer list.
 SocketTimeout.TimeoutEntry setTimeout(StreamDemultiplexor demux)
           
 
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
 

Field Detail

time_list

SocketTimeout.TimeoutEntry[] time_list

current

int current
Constructor Detail

SocketTimeout

SocketTimeout(int secs)
Method Detail

setTimeout

public SocketTimeout.TimeoutEntry setTimeout(StreamDemultiplexor demux)

run

public void run()
This timer is implemented by sleeping for 1 second and then checking the timer list.


kill

public void kill()
Stop the timer thread.