cz.cuni.amis.utils.flag
Interface ReasonFlagListener<TYPE,REASON>

Type Parameters:
TYPE -
REASON -
All Superinterfaces:
java.util.EventListener, FlagListener<TYPE>
All Known Implementing Classes:
ReasonFlagListener.FlagListenerAdapter

public interface ReasonFlagListener<TYPE,REASON>
extends FlagListener<TYPE>

Listener for ReasonFlag. It allows to sense reasons of the changes. It provides a simple message passing mechanism along with changes in the flag.

For instance, it allows us to send reason why the Mediator has been shut down.


Nested Class Summary
static class ReasonFlagListener.FlagListenerAdapter<T,R>
          Adapter for the simple FlagListener that does not care about reasons (the reason is masked during the call...)
static class ReasonFlagListener.ReasonFlagListenerNotifier<T,R>
          Notifier for the ReasonFlagListener.
 
Nested classes/interfaces inherited from interface cz.cuni.amis.utils.flag.FlagListener
FlagListener.FlagListenerNotifier<T>
 
Method Summary
 void flagChanged(TYPE changedValue, REASON reason)
          This method is called whenever the flag has changed its value and the changer also specified a reason for this change.
 
Methods inherited from interface cz.cuni.amis.utils.flag.FlagListener
flagChanged
 

Method Detail

flagChanged

void flagChanged(TYPE changedValue,
                 REASON reason)
This method is called whenever the flag has changed its value and the changer also specified a reason for this change.

Parameters:
changedValue -
reason -