com.neeve.emx
Interface IEmxEventHandler


public interface IEmxEventHandler

Specifies the event handler.

An event handler is a sink for events dispatched by the dispatcher. Each event provided to the dispatcher for scheduling is associated with an event handler to which the event will be dispatched.


Method Summary
 boolean onEvent(IEmxDispatcher dispatcher, IEmxEvent event)
          The event handler method.
 

Method Detail

onEvent

boolean onEvent(IEmxDispatcher dispatcher,
                IEmxEvent event)
The event handler method.

Parameters:
dispatcher - The dispatcher that is dispatching this event.
event - The dispatched event.
Returns:
This method should return true in case the user wishes to reschedule the event with the dispatcher. In such a case, the dispatcher will reschedule the event for dispatch. The event is removed from the dispatcher scheduling queues in case this method returns false.

This is the method invoked by a dispatcher to dispatch an event. The user (event handler) must not retain a reference to a dispatched event subsequent to returning from this method in case the dispatcher is asked to reschedule the event.

Threading:
This method is always invoked in the context of the owner thread of the dispatcher that dispatched the event to this handler.


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.