org.omnaest.utils.events.adapter
Interface EventListenerAdapter<OTHER_EVENT,OTHER_RESULT,EVENT,RESULT>

Type Parameters:
OTHER_EVENT - parameter coming from the source listener
OTHER_RESULT - return tuple coming from the source listener
EVENT - paramter returned by the adapter
RESULT - return tuple returned by the adapter

public interface EventListenerAdapter<OTHER_EVENT,OTHER_RESULT,EVENT,RESULT>

Adapter interface used to connect two EventManager instances with EventManagerImpl#listenTo(EventListenerRegistration, EventListenerAdapter). Converts the source and event from another EventListener to a current source and event. And the result and client coming from a current EventListener back to the other EventListeners client and result.

Author:
Omnaest
See Also:
EventListener, EventManager, EventListenerRegistration

Nested Class Summary
static class EventListenerAdapter.ClientResultContainer<CLIENT,RESULT>
           
static class EventListenerAdapter.SourceEventDataContainer<SOURCE,EVENT,DATA>
          Container which allows storage of tuples.
 
Method Summary
 List<EVENT> adaptEvent(OTHER_EVENT otherParameter)
          Adapts a given source and its event listener.
 List<OTHER_RESULT> adaptResult(RESULT returninfo)
          Adapts the given result from a given client.
 

Method Detail

adaptEvent

List<EVENT> adaptEvent(OTHER_EVENT otherParameter)
Adapts a given source and its event listener. Result is a parameter tuple, this allows to generate multiple results and multiple clients.

Parameters:
otherParameter -
Returns:

adaptResult

List<OTHER_RESULT> adaptResult(RESULT returninfo)
Adapts the given result from a given client. Result is a tuple of return information, this allows to generate multiple results and multiple clients.

Parameters:
returninfo -
Returns:


Copyright © 2013. All Rights Reserved.