org.LiveGraph.events
Class EventManager
java.lang.Object
org.LiveGraph.events.EventManager
- All Implemented Interfaces:
- EventProducer
public class EventManager
- extends java.lang.Object
- implements EventProducer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listeners
private java.util.List<EventListener> listeners
eventQueue
private java.util.Queue<Event<? extends EventType>> eventQueue
shutDownWhenFinished
private boolean shutDownWhenFinished
shutDownImmediately
private boolean shutDownImmediately
eventDispatcher
private java.lang.Thread eventDispatcher
shutDownHooks
private java.util.List<EventManager.ShutDownHook> shutDownHooks
EventManager
public EventManager()
addShutDownHook
public boolean addShutDownHook(EventManager.ShutDownHook hook)
startDispatchingEvents
public void startDispatchingEvents()
shutDownWhenFinished
public void shutDownWhenFinished()
shutDownImmediately
public void shutDownImmediately()
debug_printQueue
private void debug_printQueue()
waitForEvents
public void waitForEvents()
mustShutDown
private boolean mustShutDown()
hasShutDown
private void hasShutDown()
registerListener
public boolean registerListener(EventListener listener)
managesListener
public boolean managesListener(EventListener listener)
unregisterListener
public boolean unregisterListener(EventListener listener)
countAllListeners
public int countAllListeners()
getInterestedListeners
public java.util.List<EventListener> getInterestedListeners(Event<? extends EventType> event)
throws EventProcessingException
- Throws:
EventProcessingException
validateEvent
public boolean validateEvent(Event<? extends EventType> event)
throws EventProcessingException,
ValidationRequirementException
- Throws:
EventProcessingException
ValidationRequirementException
raiseEvent
public void raiseEvent(Event<? extends EventType> event)
throws ValidationRequirementException
- Throws:
ValidationRequirementException
eventValidateRaise
public boolean eventValidateRaise(Event<? extends EventType> event)
throws EventProcessingException
- Throws:
EventProcessingException
doRaiseEvent
private void doRaiseEvent(Event<? extends EventType> event)
throws EventProcessingException
- Throws:
EventProcessingException
raiseExceptionOccured
private void raiseExceptionOccured(Event<? extends EventType> event,
EventProcessingException exception)
justDisplayException
private void justDisplayException(java.lang.Throwable ex)
eventProcessingFinished
public void eventProcessingFinished(Event<? extends EventType> event)
- Specified by:
eventProcessingFinished
in interface EventProducer
eventProcessingException
public boolean eventProcessingException(Event<? extends EventType> event,
EventProcessingException exception)
- Specified by:
eventProcessingException
in interface EventProducer