Class DefaultRemoteSystemClient

java.lang.Object
de.hybris.platform.outboundservices.facade.impl.DefaultRemoteSystemClient
All Implemented Interfaces:
RemoteSystemClient

public class DefaultRemoteSystemClient extends Object implements RemoteSystemClient
Default implementation of the RemoteSystemClient that uses RestOperations for communication with the remote system.
  • Constructor Details

    • DefaultRemoteSystemClient

      public DefaultRemoteSystemClient(@NotNull @NotNull IntegrationRestTemplateFactory factory)
      Instantiates this client with required dependencies.
      Parameters:
      factory - implementation of the IntegrationRestTemplateFactory to use in this client for creating the RestOperations.
  • Method Details

    • post

      public org.springframework.http.ResponseEntity<Map> post(@NotNull @NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<Map<String,Object>> entity)
      Description copied from interface: RemoteSystemClient
      Performs POST request to the remote system.
      Specified by:
      post in interface RemoteSystemClient
      Parameters:
      destination - a remote system info, e.g. URL, to which the request has to be sent.
      entity - an entity to use for the POST request body.
      Returns:
      result of the POST request.
    • post

      public <T, U> org.springframework.http.ResponseEntity<T> post(@NotNull @NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<U> entity, Class<T> responseType)
      Description copied from interface: RemoteSystemClient
      Performs POST request to the remote system with a parametrized response type.
      Specified by:
      post in interface RemoteSystemClient
      Type Parameters:
      T - Type of response entity
      U - Type of request entity
      Parameters:
      destination - a remote system info, e.g. URL, to which the request has to be sent.
      entity - an entity to use for the POST request body.
      responseType - the class type that the HTTP response will contain
      Returns:
      A ResponseEntity with the contents of the REST call response
    • post

      public <T, U> org.springframework.http.ResponseEntity<T> post(@NotNull @NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<U> entity, Class<T> responseType, String additionalPath)
      Description copied from interface: RemoteSystemClient
      Performs POST request to the remote system with a parametrized response type.
      Specified by:
      post in interface RemoteSystemClient
      Type Parameters:
      T - Type of response entity
      U - Type of request entity
      Parameters:
      destination - a remote system info, e.g. URL, to which the request has to be sent.
      entity - an entity to use for the POST request body.
      responseType - the class type that the HTTP response will contain
      additionalPath - additional request path added to the destination URL
      Returns:
      A ResponseEntity with the contents of the REST call response