Package software.amazon.awssdk.crt.iot
Class RequestResponseOperation.RequestResponseOperationBuilder
- java.lang.Object
-
- software.amazon.awssdk.crt.iot.RequestResponseOperation.RequestResponseOperationBuilder
-
- Enclosing class:
- RequestResponseOperation
public static class RequestResponseOperation.RequestResponseOperationBuilder extends Object
Builder class for RequestResponseOperation instances
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestResponseOperation
build()
Creates a new RequestResponseOperation instance based on the builder's configuration.RequestResponseOperation.RequestResponseOperationBuilder
withCorrelationToken(String correlationToken)
Sets the correlation token embedded in the request that must be found in a response message.RequestResponseOperation.RequestResponseOperationBuilder
withPayload(byte[] payload)
Sets the payload to publish to 'publishTopic' in order to initiate the request.RequestResponseOperation.RequestResponseOperationBuilder
withPublishTopic(String publishTopic)
Sets the topic to publish the request to once response subscriptions have been established.RequestResponseOperation.RequestResponseOperationBuilder
withResponsePath(ResponsePath path)
Adds a response path to the set of all possible response paths associated with this request.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.
-
-
-
Method Detail
-
withResponsePath
public RequestResponseOperation.RequestResponseOperationBuilder withResponsePath(ResponsePath path)
Adds a response path to the set of all possible response paths associated with this request.- Parameters:
path
- response paths to associate with this request- Returns:
- the builder object
-
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
-
-