com.sun.grizzly.utils.conditions
Class ConditionListener<K,L>
java.lang.Object
com.sun.grizzly.utils.conditions.ConditionListener<K,L>
- Direct Known Subclasses:
- DefaultConditionListener
public abstract class ConditionListener<K,L>
- 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.
- Author:
- oleksiys
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
condition
protected Condition<K> condition
notificationObject
protected L notificationObject
keepAlive
protected boolean keepAlive
ConditionListener
public ConditionListener()
ConditionListener
public ConditionListener(Condition<K> condition,
L notificationObject)
notifyListener
protected abstract void notifyListener()
set
public void set(Condition<K> condition,
L notificationObject)
getCondition
public Condition<K> getCondition()
setCondition
public void setCondition(Condition<K> condition)
getNotificationObject
public L getNotificationObject()
setNotificationObject
public void setNotificationObject(L notificationObject)
checkConditionAndNotify
public boolean checkConditionAndNotify(K state)
isKeepAlive
public boolean isKeepAlive()
setKeepAlive
public void setKeepAlive(boolean keepAlive)
Copyright © 2009 SUN Microsystems. All Rights Reserved.