org.kahina.core.control
Class KahinaController
java.lang.Object
org.kahina.core.control.KahinaController
public class KahinaController
- extends Object
the central broker for event handling and passing of messages
basic concept:
- an object can fire events via processEvent if it has access to a KahinaController instance
- KahinaListeners can register themselves as listeners for event types
- the controller passes each fired event to all KahinaListeners that have registered for its type
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KahinaController
public KahinaController()
registerListener
public void registerListener(String type,
KahinaListener listener)
removeListener
public boolean removeListener(String type,
KahinaListener listener)
- Parameters:
type - listener -
- Returns:
true if listener was successfully removed, false if it never existed
processEvent
public void processEvent(KahinaEvent event)