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 Details

    • isEnabled

      default boolean isEnabled()
      Determines if the decorator is enabled.
      Returns:
      true if the decorator is enabled; false if not
    • isApplicable

      default boolean isApplicable(DecoratorContext decoratorContext)
      Determines if the decorator is applicable.
      Parameters:
      decoratorContext - with the information about the request being decorated.
      Returns:
      true if the decorator is applicable; false if 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 request
      decoratorContext - Some extra information that can be used by decorators.
      execution - The execution chain.
      Returns:
      An HttpEntity containing the result of the decoration. Normally by calling execution.createHttpEntity()