com.maverick.nio
Class IdleStateManager

java.lang.Object
  extended by com.maverick.nio.IdleStateManager

public class IdleStateManager
extends java.lang.Object

Class that checks the idle state of another class.

Author:
Lee David Painter

Constructor Summary
IdleStateManager(int servicePeriodSeconds, int numInactiveServicesPeriodsPerIdle)
           
 
Method Summary
 boolean isReady()
          Called by a selector to determine when the service run is ready to be executed.
 void register(IdleStateListener obj)
           
 void remove(IdleStateListener obj)
          Called by a listener when they want to remove themselves
 void reset(IdleStateListener obj)
          Called by a listener when they want their idle state to be reset.
 void service()
          Called by a thread which is managing idle states
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdleStateManager

public IdleStateManager(int servicePeriodSeconds,
                        int numInactiveServicesPeriodsPerIdle)
Method Detail

reset

public void reset(IdleStateListener obj)
Called by a listener when they want their idle state to be reset.

Parameters:
obj - IdleStateListener

register

public void register(IdleStateListener obj)

remove

public void remove(IdleStateListener obj)
Called by a listener when they want to remove themselves

Parameters:
obj - IdleStateListener

isReady

public boolean isReady()
Called by a selector to determine when the service run is ready to be executed.

Returns:
boolean

service

public void service()
Called by a thread which is managing idle states



Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.