Class RequestResponseOperation.RequestResponseOperationBuilder

  • Enclosing class:
    RequestResponseOperation

    public static class RequestResponseOperation.RequestResponseOperationBuilder
    extends Object
    Builder class for RequestResponseOperation instances
    • Method Detail

      • withSubscription

        public RequestResponseOperation.RequestResponseOperationBuilder withSubscription​(String topicFilter)
        Adds a topic filter to the set of topic filters that should be subscribed to in order to cover all possible response paths. Sometimes using wildcards can cut down on the subscriptions needed; other times that isn't possible to do correctly.
        Parameters:
        topicFilter - topic filter to subscribe to in order to cover one or more response paths
        Returns:
        the builder object
      • withPublishTopic

        public RequestResponseOperation.RequestResponseOperationBuilder withPublishTopic​(String publishTopic)
        Sets the topic to publish the request to once response subscriptions have been established.
        Parameters:
        publishTopic - topic to publish the request to once response subscriptions have been established
        Returns:
        the builder object
      • withPayload

        public RequestResponseOperation.RequestResponseOperationBuilder withPayload​(byte[] payload)
        Sets the payload to publish to 'publishTopic' in order to initiate the request.
        Parameters:
        payload - payload to publish to 'publishTopic' in order to initiate the request
        Returns:
        the builder object
      • withCorrelationToken

        public RequestResponseOperation.RequestResponseOperationBuilder withCorrelationToken​(String correlationToken)
        Sets the correlation token embedded in the request that must be found in a response message. This can be null to support certain services which don't use correlation tokens. In that case, the client only allows one token-less request at a time.
        Parameters:
        correlationToken - the correlation token embedded in the request that must be found in a response message
        Returns:
        the builder object
      • build

        public RequestResponseOperation build()
        Creates a new RequestResponseOperation instance based on the builder's configuration.
        Returns:
        a new RequestResponseOperation instance based on the builder's configuration