Class IdleStateManager

java.lang.Object
com.sshtools.common.nio.IdleStateManager

public class IdleStateManager extends Object
Class that checks the idle state of another class.
Author:
Lee David Painter
  • Constructor Details

    • IdleStateManager

      public IdleStateManager(int servicePeriodSeconds, int numInactiveServicesPeriodsPerIdle)
  • Method Details

    • 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