net.i2p.util
public class SocketTimeout extends Object implements SimpleTimer.TimedEvent
Constructor and Description |
---|
SocketTimeout(long delay) |
SocketTimeout(Socket socket,
long delay) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
void |
resetTimer() |
void |
setInactivityTimeout(long timeout) |
void |
setSocket(Socket s) |
void |
setTimeoutCommand(Runnable job) |
void |
setTotalTimeoutPeriod(long timeoutPeriod) |
void |
timeReached()
the time requested has been reached (this call should NOT block,
otherwise the whole SimpleTimer gets backed up)
|
String |
toString() |
public SocketTimeout(long delay)
public SocketTimeout(Socket socket, long delay)
public void timeReached()
SimpleTimer.TimedEvent
timeReached
in interface SimpleTimer.TimedEvent
public void cancel()
public void setSocket(Socket s)
public void resetTimer()
public void setInactivityTimeout(long timeout)
public void setTotalTimeoutPeriod(long timeoutPeriod)
public void setTimeoutCommand(Runnable job)