Class Call<T>
- java.lang.Object
-
- de.quantummaid.eventmaid.channel.action.Call<T>
-
- Type Parameters:
T- the type of messages of theChannel
- All Implemented Interfaces:
Action<T>
public final class Call<T> extends Object implements Action<T>
TheCallActionis used to perform an immediate jump to a different Channel. It can not be used as defaultActionof aChannel.- See Also:
- EventMaid Documentation
-
-
Constructor Summary
Constructors Constructor Description Call()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Call<T>callTo(Channel<T> targetChannel, ProcessingContext<T> processingContext)Factory method to create and execute aCallto the givenChannel.voidexecute(ProcessingContext<T> processingContext)Executed theCallAction.static <T> Call<T>prepareACall(Channel<T> targetChannel)Factory method to create aCallto the givenChannel.
-
-
-
Method Detail
-
callTo
public static <T> Call<T> callTo(Channel<T> targetChannel, ProcessingContext<T> processingContext)
Factory method to create and execute aCallto the givenChannel.- Type Parameters:
T- the type of the otherChannel- Parameters:
targetChannel- the differentChannel, that the message should be sent inprocessingContext- the message- Returns:
- the executed
Call
-
prepareACall
public static <T> Call<T> prepareACall(Channel<T> targetChannel)
Factory method to create aCallto the givenChannel. TheCallis not executed.- Type Parameters:
T- the type of the otherChannel- Parameters:
targetChannel- the differentChannel, that the message should be sent in- Returns:
- the
CallAction
-
execute
public void execute(ProcessingContext<T> processingContext)
Executed theCallAction. The message will be send in the otherChannel.- Parameters:
processingContext- the message
-
-