|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hudsonci.utils.event.EventProcessorSupport<ContextType,HandlerType>
public class EventProcessorSupport<ContextType,HandlerType extends EventHandler>
Support for event processing.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
log
|
| Constructor Summary | |
|---|---|
EventProcessorSupport(List<HandlerType> handlers,
HandlerType defaultHandler)
|
|
| Method Summary | |
|---|---|
HandlerType |
getDefaultHandler()
Get the default handler. |
protected HandlerType |
getEventHandler(Object event)
Get the event handler for the given event. |
List<HandlerType> |
getHandlers()
Get installed handlers. |
void |
init(ContextType context)
Initialize event handlers and their event type mapping. |
protected void |
onFailure(Exception cause)
|
void |
process(Object event)
Process an event. |
void |
setDefaultHandler(HandlerType defaultHandler)
Set the default handler. |
void |
setHandlers(List<HandlerType> handlers)
Set installed handlers. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger log
| Constructor Detail |
|---|
public EventProcessorSupport(List<HandlerType> handlers,
HandlerType defaultHandler)
| Method Detail |
|---|
public List<HandlerType> getHandlers()
public void setHandlers(List<HandlerType> handlers)
public HandlerType getDefaultHandler()
public void setDefaultHandler(HandlerType defaultHandler)
public void init(ContextType context)
init in interface EventProcessor<ContextType>
public void process(Object event)
throws Exception
process in interface EventProcessor<ContextType>Exception
protected void onFailure(Exception cause)
throws Exception
Exceptionprotected HandlerType getEventHandler(Object event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||