Class Call<T>

  • Type Parameters:
    T - the type of messages of the Channel
    All Implemented Interfaces:
    Action<T>

    public final class Call<T>
    extends Object
    implements Action<T>
    The Call Action is used to perform an immediate jump to a different Channel. It can not be used as default Action of a Channel.
    See Also:
    EventMaid Documentation
    • Constructor Detail

      • Call

        public Call()
    • Method Detail

      • callTo

        public static <T> Call<T> callTo​(Channel<T> targetChannel,
                                         ProcessingContext<T> processingContext)
        Factory method to create and execute a Call to the given Channel.
        Type Parameters:
        T - the type of the other Channel
        Parameters:
        targetChannel - the different Channel, that the message should be sent in
        processingContext - the message
        Returns:
        the executed Call
      • prepareACall

        public static <T> Call<T> prepareACall​(Channel<T> targetChannel)
        Factory method to create a Call to the given Channel. The Call is not executed.
        Type Parameters:
        T - the type of the other Channel
        Parameters:
        targetChannel - the different Channel, that the message should be sent in
        Returns:
        the Call Action
      • execute

        public void execute​(ProcessingContext<T> processingContext)
        Executed the Call Action. The message will be send in the other Channel.
        Parameters:
        processingContext - the message