com.sun.grizzly.util
Class StateHolder.ConditionListener<E>

java.lang.Object
  extended by com.sun.grizzly.util.StateHolder.ConditionListener<E>
Direct Known Subclasses:
StateHolder.EqualConditionListener, StateHolder.NotEqualConditionListener
Enclosing class:
StateHolder<E>

public abstract static class StateHolder.ConditionListener<E>
extends Object

Common ConditionListener class, which could be used with StateHolder, to register custom conditions. On each state change - condition will be checked, if it's true - Condition's listener will be notified.


Field Summary
 StateHolder.EventListener listener
           
 E state
           
 
Constructor Summary
StateHolder.ConditionListener()
           
 
Method Summary
abstract  boolean check(E state)
           
 void notifyListener()
           
protected  void set(E state, StateHolder.EventListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

public E state

listener

public StateHolder.EventListener listener
Constructor Detail

StateHolder.ConditionListener

public StateHolder.ConditionListener()
Method Detail

set

protected void set(E state,
                   StateHolder.EventListener listener)

notifyListener

public void notifyListener()

check

public abstract boolean check(E state)


Copyright © 2010 SUN Microsystems. All Rights Reserved.