Class Messaging.Builder

    • Method Detail

      • config

        public Messaging.Builder config​(Config config)
        Configuration needed for configuring connector and their routing.
        Parameters:
        config - config for connectors and their routes.
        Returns:
        this builder
      • emitter

        public <PAYLOAD> Messaging.Builder emitter​(Emitter<PAYLOAD> emitter)
        Register new emitter and all its channels.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        emitter - to be registered
        Returns:
        this builder
      • publisher

        public <PAYLOAD> Messaging.Builder publisher​(Channel<PAYLOAD> channel,
                                                     PublisherBuilder<? extends Message<? extends PAYLOAD>> publisherBuilder)
        Register PublisherBuilder to be used for construction of the publisher for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to be publisher constructed for
        publisherBuilder - to be used for construction of the publisher
        Returns:
        this builder
      • publisher

        public <PAYLOAD> Messaging.Builder publisher​(Channel<PAYLOAD> channel,
                                                     Publisher<? extends PAYLOAD> publisher,
                                                     Function<? super PAYLOAD,​? extends Message<? extends PAYLOAD>> wrapper)
        Register Publisher to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use publisher in
        publisher - to publish in supplied channel
        wrapper - function to be used for raw payload wrapping, if null simple Message.of(Object) is used.
        Returns:
        this builder
      • publisher

        public <PAYLOAD> Messaging.Builder publisher​(Channel<PAYLOAD> channel,
                                                     Flow.Publisher<? extends PAYLOAD> publisher,
                                                     Function<? super PAYLOAD,​? extends Message<? extends PAYLOAD>> wrapper)
        Register Flow.Publisher to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use publisher in
        publisher - to publish in supplied channel
        wrapper - function to be used for raw payload wrapping, if null simple Message.of(Object) is used.
        Returns:
        this builder
      • publisher

        public <PAYLOAD> Messaging.Builder publisher​(Channel<PAYLOAD> channel,
                                                     Flow.Publisher<? extends Message<? extends PAYLOAD>> publisher)
        Register Flow.Publisher to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use publisher in
        publisher - to publish in supplied channel
        Returns:
        this builder
      • publisher

        public <PAYLOAD> Messaging.Builder publisher​(Channel<PAYLOAD> channel,
                                                     Publisher<? extends Message<? extends PAYLOAD>> publisher)
        Register Publisher to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use publisher in
        publisher - to publish in supplied channel
        Returns:
        this builder
      • subscriber

        public <PAYLOAD> Messaging.Builder subscriber​(Channel<PAYLOAD> channel,
                                                      Flow.Subscriber<? extends Message<? extends PAYLOAD>> subscriber)
        Register Flow.Subscriber to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use subscriber in
        subscriber - to subscribe to supplied channel
        Returns:
        this builder
      • subscriber

        public <PAYLOAD> Messaging.Builder subscriber​(Channel<PAYLOAD> channel,
                                                      Consumer<Multi<? extends Message<? extends PAYLOAD>>> consumer)
        Use provided Multi to subscribe to supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use subscriber in
        consumer - to subscribe to supplied channel
        Returns:
        this builder
      • subscriber

        public <PAYLOAD,​RESULT> Messaging.Builder subscriber​(Channel<PAYLOAD> channel,
                                                                   SubscriberBuilder<? extends Message<? extends PAYLOAD>,​RESULT> subscriberBuilder)
        Register SubscriberBuilder to be used for creating Subscriber for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        RESULT - result type
        Parameters:
        channel - to use subscriber in
        subscriberBuilder - to subscribe to supplied channel
        Returns:
        this builder
      • subscriber

        public <PAYLOAD> Messaging.Builder subscriber​(Channel<PAYLOAD> channel,
                                                      Subscriber<? extends Message<? extends PAYLOAD>> subscriber)
        Register Subscriber to be used for supplied Channel.
        Type Parameters:
        PAYLOAD - message payload type
        Parameters:
        channel - to use subscriber in
        subscriber - to subscribe to supplied channel
        Returns:
        this builder
      • processor

        public <PAYLOAD,​RESULT> Messaging.Builder processor​(Channel<PAYLOAD> in,
                                                                  Channel<RESULT> out,
                                                                  Processor<? extends Message<? extends PAYLOAD>,​? extends Message<? extends RESULT>> processor)
        Register Processor to be used is in Channel's subscriber and out Channel's publisher.
        Type Parameters:
        PAYLOAD - message payload type of in channel
        RESULT - message payload type of out channel
        Parameters:
        in - Channel to use supplied Processor as subscriber in
        out - Channel to use supplied Processor as publisher in
        processor - to be used between supplied channels
        Returns:
        this builder
      • processor

        public <PAYLOAD,​RESULT> Messaging.Builder processor​(Channel<PAYLOAD> in,
                                                                  Channel<RESULT> out,
                                                                  Function<? super PAYLOAD,​? extends RESULT> messageFunction)
        Register a mapping function between two channels.
        Type Parameters:
        PAYLOAD - message payload type of in channel
        RESULT - message payload type of out channel
        Parameters:
        in - Channel to map from
        out - Channel to map to
        messageFunction - mapping function
        Returns:
        this builder