com.neeve.event
Interface IEventDispatcher

All Superinterfaces:
IEventHandler
All Known Implementing Classes:
EventDispatcher

public interface IEventDispatcher
extends IEventHandler

Represents an event dispatcher.

This interface serves as the base interface for all dispatchers. It supports dispatch by event type.

Threading:
This class is not safe for concurrent access by multiple threads.

Method Summary
 void addEventHandler(Class<? extends Event> type, IEventHandler handler)
          Add an event type handler.
 void removeEventHandler(Class<? extends Event> type, IEventHandler handler)
          Remove an event type handler.
 
Methods inherited from interface com.neeve.event.IEventHandler
onEvent
 

Method Detail

addEventHandler

void addEventHandler(Class<? extends Event> type,
                     IEventHandler handler)
Add an event type handler.

Parameters:
type - The event type for which the handler is being installed.
handler - The handler being added.
Threading:
The thread safety of this method is determined by the dispatcher implementation. Refer to the implementation documentation for thread safety information pertaining to this method.

removeEventHandler

void removeEventHandler(Class<? extends Event> type,
                        IEventHandler handler)
Remove an event type handler.

Parameters:
type - The event type for which the handler is being removed.
handler - The handler being removed.
Threading:
The thread safety of this method is determined by the dispatcher implementation. Refer to the implementation documentation for thread safety information pertaining to this method.


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