Class ConsumerActionHandler<T>
- java.lang.Object
-
- de.quantummaid.eventmaid.channel.action.ConsumerActionHandler<T>
-
- Type Parameters:
T- the type of messages of theChannel
- All Implemented Interfaces:
ActionHandler<Consume<T>,T>
public final class ConsumerActionHandler<T> extends Object implements ActionHandler<Consume<T>,T>
TheActionHandlerimplementation for theConsumeAction. This handler will always execute the consumer given to theConsumeAction.- See Also:
- EventMaid Documentation
-
-
Constructor Summary
Constructors Constructor Description ConsumerActionHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ConsumerActionHandler<T>consumerActionHandler()Factory method for a newConsumerActionHandler.voidhandle(Consume<T> consume, ProcessingContext<T> processingContext)Will call theConsumeAction'sconsumer.
-
-
-
Method Detail
-
consumerActionHandler
public static <T> ConsumerActionHandler<T> consumerActionHandler()
Factory method for a newConsumerActionHandler.- Type Parameters:
T- the type of messages of theChannel- Returns:
- a new
ConsumerActionHandler
-
handle
public void handle(Consume<T> consume, ProcessingContext<T> processingContext)
Will call theConsumeAction'sconsumer.- Specified by:
handlein interfaceActionHandler<Consume<T>,T>- Parameters:
consume- theConsumeActionto be handledprocessingContext- the message
-
-