HTTPClient
Class SocketTimeout

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--HTTPClient.SocketTimeout
All Implemented Interfaces:
java.lang.Runnable

class SocketTimeout
extends java.lang.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.


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

Field Detail

IDLE

public static final int IDLE

time_list

SocketTimeout.TimeoutEntry[] time_list

current

int current
Constructor Detail

SocketTimeout

SocketTimeout()
Method Detail

writeTimeList

void writeTimeList()

reallocate

void reallocate(int max)

setTimeout

public SocketTimeout.TimeoutEntry setTimeout(StreamDemultiplexor demux,
                                             int idle)

run

public void run()
This timer is implemented by sleeping for 1 second and then checking the timer list.
Overrides:
run in class java.lang.Thread

kill

public void kill()
Stop the timer thread.