net.i2p.util
Class SocketTimeout

java.lang.Object
  extended by net.i2p.util.SimpleTimer2.TimedEvent
      extended by net.i2p.util.SocketTimeout
All Implemented Interfaces:
Runnable

public class SocketTimeout
extends SimpleTimer2.TimedEvent

This should be deprecated. It is only used by EepGet and Syndie. The only advantage seems to be a total timeout period, which is the second argument to EepGet.fetch(headerTimeout, totalTimeout, inactivityTimeout), which is most likely always set to -1. Use socket.setsotimeout instead?


Field Summary
 
Fields inherited from class net.i2p.util.SimpleTimer2.TimedEvent
DEFAULT_FUZZ
 
Constructor Summary
SocketTimeout(long delay)
           
SocketTimeout(Socket socket, long delay)
           
 
Method Summary
 boolean cancel()
          Change in return value from void to boolean in 0.9.3 accidentally broke Syndie, sorry.
 void resetTimer()
           
 void setInactivityTimeout(long timeout)
           
 void setSocket(Socket s)
           
 void setTimeoutCommand(Runnable job)
           
 void setTotalTimeoutPeriod(long timeoutPeriod)
           
 void timeReached()
          Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)
 String toString()
           
 
Methods inherited from class net.i2p.util.SimpleTimer2.TimedEvent
forceReschedule, reschedule, reschedule, run, schedule, setFuzz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SocketTimeout

public SocketTimeout(long delay)

SocketTimeout

public SocketTimeout(Socket socket,
                     long delay)
Method Detail

timeReached

public void timeReached()
Description copied from class: SimpleTimer2.TimedEvent
Simple interface for events to be queued up and notified on expiration the time requested has been reached (this call should NOT block, otherwise the whole SimpleTimer gets backed up)

Specified by:
timeReached in class SimpleTimer2.TimedEvent

cancel

public boolean cancel()
Change in return value from void to boolean in 0.9.3 accidentally broke Syndie, sorry. Recompile Syndie to fix it.

Overrides:
cancel in class SimpleTimer2.TimedEvent

setSocket

public void setSocket(Socket s)

resetTimer

public void resetTimer()

setInactivityTimeout

public void setInactivityTimeout(long timeout)

setTotalTimeoutPeriod

public void setTotalTimeoutPeriod(long timeoutPeriod)

setTimeoutCommand

public void setTimeoutCommand(Runnable job)

toString

public String toString()
Overrides:
toString in class Object