Class IdleStatusChecker
java.lang.Object
org.apache.mina.core.session.IdleStatusChecker
Detects idle sessions and fires
sessionIdle events to them.
To be used for service unable to trigger idle events alone, like VmPipe
or SerialTransport. Polling base transport are advised to trigger idle
events alone, using the poll/select timeout.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassThe class to place in the transport executor for checking the sessions idleprivate class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IdleStatusChecker.NotifyingTaskprivate final IoFutureListener<IoFuture> private final Set<AbstractIoSession> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSession(AbstractIoSession session) Add the session for being checked for idle.get a runnable task able to be scheduled in theIoServiceexecutor.
-
Field Details
-
sessions
-
notifyingTask
-
sessionCloseListener
-
-
Constructor Details
-
IdleStatusChecker
public IdleStatusChecker()Creates a new instance of IdleStatusChecker
-
-
Method Details
-
addSession
Add the session for being checked for idle.- Parameters:
session- the session to check
-
getNotifyingTask
get a runnable task able to be scheduled in theIoServiceexecutor.- Returns:
- the associated runnable task
-