public abstract class IdleTimeout extends Object
Constructor and Description |
---|
IdleTimeout(Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
protected long |
checkIdleTimeout() |
protected void |
close() |
long |
getIdleTimeout() |
long |
getIdleTimestamp() |
protected abstract boolean |
isOpen()
This abstract method should be called to check if idle timeouts
should still be checked.
|
void |
notIdle()
This method should be called when non-idle activity has taken place.
|
protected abstract void |
onIdleExpired(TimeoutException timeout)
This abstract method is called when the idle timeout has expired.
|
protected void |
scheduleIdleTimeout(long delay) |
void |
setIdleTimeout(long idleTimeout) |
public IdleTimeout(Scheduler scheduler)
scheduler
- A scheduler used to schedule checks for the idle timeout.public long getIdleTimestamp()
public long getIdleTimeout()
public void setIdleTimeout(long idleTimeout)
public void notIdle()
protected void scheduleIdleTimeout(long delay)
protected void close()
protected long checkIdleTimeout()
protected abstract void onIdleExpired(TimeoutException timeout)
timeout
- a TimeoutExceptionprotected abstract boolean isOpen()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.