C
- Type of processing contextpublic class ListenerSource<C extends ProcessingContext> extends Object
Constructor and Description |
---|
ListenerSource(Class<C> contextType)
Create an instance of listener source for a particular type of processing context
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ProcessingEvent event,
BiFunction<C,ProcessingStage<C>,ProcessingStage<C>> listener)
Add processing event listener.
|
Class<C> |
getContextType() |
Collection<BiFunction<C,ProcessingStage<C>,ProcessingStage<C>>> |
getListeners(ProcessingEvent event) |
public void addListener(ProcessingEvent event, BiFunction<C,ProcessingStage<C>,ProcessingStage<C>> listener)
BiFunction
,
that accepts the processing context and default next stage
and returns the actual next stage (i.e. it can also be considered a router).event
- Type of processing event to be notified oflistener
- Routing functionpublic Collection<BiFunction<C,ProcessingStage<C>,ProcessingStage<C>>> getListeners(ProcessingEvent event)
event
- Type of processing eventCopyright © 2016–2021. All rights reserved.