Class DefaultRemoteSystemClient
java.lang.Object
de.hybris.platform.outboundservices.facade.impl.DefaultRemoteSystemClient
- All Implemented Interfaces:
RemoteSystemClient
Default implementation of the
RemoteSystemClient that uses RestOperations for
communication with the remote system.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultRemoteSystemClient(@NotNull IntegrationRestTemplateFactory factory) Instantiates this client with required dependencies. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Map>post(@NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<Map<String, Object>> entity) Performs POST request to the remote system.<T,U> org.springframework.http.ResponseEntity<T> post(@NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<U> entity, Class<T> responseType) Performs POST request to the remote system with a parametrized response type.<T,U> org.springframework.http.ResponseEntity<T> post(@NotNull ConsumedDestinationModel destination, org.springframework.http.HttpEntity<U> entity, Class<T> responseType, String additionalPath) Performs POST request to the remote system with a parametrized response type.
-
Constructor Details
-
DefaultRemoteSystemClient
Instantiates this client with required dependencies.- Parameters:
factory- implementation of theIntegrationRestTemplateFactoryto use in this client for creating theRestOperations.
-
-
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:RemoteSystemClientPerforms POST request to the remote system.- Specified by:
postin interfaceRemoteSystemClient- 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:RemoteSystemClientPerforms POST request to the remote system with a parametrized response type.- Specified by:
postin interfaceRemoteSystemClient- Type Parameters:
T- Type of response entityU- 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:RemoteSystemClientPerforms POST request to the remote system with a parametrized response type.- Specified by:
postin interfaceRemoteSystemClient- Type Parameters:
T- Type of response entityU- 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 containadditionalPath- additional request path added to thedestinationURL- Returns:
- A ResponseEntity with the contents of the REST call response
-