org.apache.mina.core.session
Class IdleStatusChecker

java.lang.Object
  extended by org.apache.mina.core.session.IdleStatusChecker

public class IdleStatusChecker
extends Object

Detects idle sessions and fires sessionIdle events to them.

Version:
$Rev: 525369 $, $Date: 2007-04-04 05:05:11 +0200 (mer., 04 avr. 2007) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Nested Class Summary
static interface IdleStatusChecker.NotifyingTask
           
 
Constructor Summary
IdleStatusChecker()
           
 
Method Summary
 void addService(AbstractIoService service)
           
 void addSession(AbstractIoSession session)
           
 IdleStatusChecker.NotifyingTask getNotifyingTask()
           
static void notifyIdleness(IoService service, long currentTime)
           
static void notifyIdleness(Iterator<? extends IoSession> sessions, long currentTime)
          Fires a IoEventType.SESSION_IDLE event to any applicable sessions in the specified collection.
static void notifyIdleSession(IoSession session, long currentTime)
          Fires a IoEventType.SESSION_IDLE event if applicable for the specified session.
 void removeService(AbstractIoService service)
           
 void removeSession(AbstractIoSession session)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdleStatusChecker

public IdleStatusChecker()
Method Detail

addSession

public void addSession(AbstractIoSession session)

addService

public void addService(AbstractIoService service)

removeSession

public void removeSession(AbstractIoSession session)

removeService

public void removeService(AbstractIoService service)

getNotifyingTask

public IdleStatusChecker.NotifyingTask getNotifyingTask()

notifyIdleness

public static void notifyIdleness(Iterator<? extends IoSession> sessions,
                                  long currentTime)
Fires a IoEventType.SESSION_IDLE event to any applicable sessions in the specified collection.

Parameters:
currentTime - the current time (i.e. System.currentTimeMillis())

notifyIdleness

public static void notifyIdleness(IoService service,
                                  long currentTime)

notifyIdleSession

public static void notifyIdleSession(IoSession session,
                                     long currentTime)
Fires a IoEventType.SESSION_IDLE event if applicable for the specified session.

Parameters:
currentTime - the current time (i.e. System.currentTimeMillis())


Copyright © 2004-2008 Apache MINA Project. All Rights Reserved.