org.hudsonci.utils.event
Interface EventHandler<ContextType,EventType>

All Known Implementing Classes:
EventHandlerSupport

public interface EventHandler<ContextType,EventType>

Abstraction to allow event handling logic to be componentized.

Since:
2.1.0
Author:
Jason Dillon

Method Summary
 boolean accept(Object event)
          Returns true if this handler can consume the given event.
 void handle(EventType event)
          Handles the given event.
 void init(ContextType context)
          Called to initialize the handler w/context.
 

Method Detail

init

void init(ContextType context)
Called to initialize the handler w/context.


accept

boolean accept(Object event)
Returns true if this handler can consume the given event.


handle

void handle(EventType event)
            throws Exception
Handles the given event.

Throws:
Exception


Copyright © 2004-2011 Hudson. All Rights Reserved.