Interface OutboundRequestDecorator
- All Known Implementing Classes:
DefaultAcceptHeaderRequestDecorator,DefaultCloudEventHeadersRequestDecorator,DefaultContextErrorDecorator,DefaultCsrfOutboundRequestDecorator,DefaultOutboundMonitoringRequestDecorator,DefaultPayloadBuildingRequestDecorator,DefaultSapPassportRequestDecorator,WebhookPayloadBuildingRequestDecorator
public interface OutboundRequestDecorator
Decorates the outbound client request. By modifying headers and payload along the decorator chain.
-
Method Summary
Modifier and TypeMethodDescriptiondecorate(org.springframework.http.HttpHeaders httpHeaders, Map<String, Object> payload, DecoratorContext decoratorContext, DecoratorExecution execution) Decorates an Outbound requestdefault booleanisApplicable(DecoratorContext decoratorContext) Determines if the decorator is applicable.default booleanDetermines if the decorator is enabled.
-
Method Details
-
isEnabled
default boolean isEnabled()Determines if the decorator is enabled.- Returns:
trueif the decorator is enabled;falseif not
-
isApplicable
Determines if the decorator is applicable.- Parameters:
decoratorContext- with the information about the request being decorated.- Returns:
trueif the decorator is applicable;falseif not
-
decorate
org.springframework.http.HttpEntity<Map<String,Object>> decorate(org.springframework.http.HttpHeaders httpHeaders, Map<String, Object> payload, DecoratorContext decoratorContext, DecoratorExecution execution) Decorates an Outbound request- Parameters:
httpHeaders- The headers to be used for the outgoing request.payload- The payload used for the requestdecoratorContext- Some extra information that can be used by decorators.execution- The execution chain.- Returns:
- An
HttpEntitycontaining the result of the decoration. Normally by callingexecution.createHttpEntity()
-