public abstract class IdleTimeout extends Object
Constructor and Description |
---|
IdleTimeout(Scheduler scheduler) |
Modifier and Type | Method and Description |
---|---|
protected long |
checkIdleTimeout() |
long |
getIdleTimeout() |
long |
getIdleTimestamp() |
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.
|
void |
onClose() |
protected abstract void |
onIdleExpired(TimeoutException timeout)
This abstract method is called when the idle timeout has expired.
|
void |
onOpen() |
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()
public void onOpen()
public void onClose()
protected long checkIdleTimeout()
protected abstract void onIdleExpired(TimeoutException timeout)
timeout
- a TimeoutExceptionpublic abstract boolean isOpen()
Copyright © 1995-2015 Webtide. All Rights Reserved.