public class SocketTimeout extends SimpleTimer2.TimedEvent
_state, DEFAULT_FUZZ| Constructor and Description |
|---|
SocketTimeout(long delay) |
SocketTimeout(Socket socket,
long delay)If socket is non-null, or is set later by setSocket(),
it will be closed when the timer expires. |
| Modifier and Type | Method and Description |
|---|---|
boolean | cancel()Change in return value from void to boolean in
0.9.3 accidentally broke Syndie, sorry. |
void | resetTimer()Call when there is activity |
void | setInactivityTimeout(long delay)Changes the delay provided in the constructor |
void | setSocket(Socket s)If non-null, will be closed when the timer expires. |
void | setTimeoutCommand(Runnable job)If non-null, will be run when the timer expires. |
void | setTotalTimeoutPeriod(long timeoutPeriod)If greater than zero, must be greater than the inactivity timeout. |
void | timeReached()Called when this event's scheduled time arrives. |
String | toString() |
forceReschedule, reschedule, reschedule, run, schedule, setFuzz, setPoolpublic SocketTimeout(long delay)
delay - The inactivity delay, greater than zeropublic SocketTimeout(Socket socket, long delay)
socket - may be nulldelay - The inactivity delay, greater than zeropublic boolean cancel()
cancel in class SimpleTimer2.TimedEventpublic void resetTimer()
public void setInactivityTimeout(long delay)
delay - greater than zeropublic void setSocket(Socket s)
public void setTimeoutCommand(Runnable job)
public void setTotalTimeoutPeriod(long timeoutPeriod)
timeoutPeriod - Time since constructed, or less than or equal to zero to disablepublic void timeReached()
SimpleTimer2.TimedEventtimeReached in class SimpleTimer2.TimedEventpublic String toString()
toString in class SimpleTimer2.TimedEvent