Class ErpHttpRequestExecutor<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.ErpHttpRequestExecutor<RequestT,RequestResultT>
- Type Parameters:
RequestT
- The type of the request to execute.RequestResultT
- The type of the result to return.
@Deprecated
public class ErpHttpRequestExecutor<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
extends Object
Deprecated.
This module will be discontinued, along with its classes and methods.
A collection of methods which are commonly called during executions of a request against an ERP system.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(HttpDestination destination, SerializedRequest<RequestT> serializedRequest) Deprecated.Executes the givenserializedRequest
as aHttpUriRequest
, returning the body of theHttpResponse
received.execute
(HttpDestination destination, RequestT request, RequestSerializer<RequestT, RequestResultT> requestSerializer) Deprecated.Serializes the given request, executes it, and the deserializes the response.Deprecated.protected com.sap.cloud.sdk.s4hana.connectivity.ErpHttpRequestExecutor.RequestBodyWithHeader
getRequestBodyWithHeader
(HttpDestination destination, SerializedRequest<RequestT> request) Deprecated.Returns a wrapper object which encapsulates the HTTP request body and headers.protected URI
getRequestUri
(HttpDestination destination, SerializedRequest<RequestT> serializedRequest) Deprecated.Get the request URI.protected void
logReadAccessAttempt
(Request<?, ?> request, HttpDestination destination) Deprecated.Logs the read access attempt of the givenrequest
for the givendestination
.
-
Constructor Details
-
ErpHttpRequestExecutor
public ErpHttpRequestExecutor()Deprecated.
-
-
Method Details
-
execute
@Nonnull public RequestResultT execute(@Nonnull HttpDestination destination, @Nonnull RequestT request, @Nonnull RequestSerializer<RequestT, RequestResultT> requestSerializer) throws RequestSerializationException, RequestExecutionException, DestinationNotFoundException, DestinationAccessExceptionDeprecated.Serializes the given request, executes it, and the deserializes the response.- Parameters:
destination
- TheHttpDestination
of this call.request
- TheRequest
to be executed.requestSerializer
- TheRequestSerializer
to be used to write the request and read the response.- Returns:
- The body of the response received by the given request.
- Throws:
RequestSerializationException
- If the request could not be serializedRequestExecutionException
- If any Exception occured during execution of the request.DestinationNotFoundException
- If the Destination cannot be found.DestinationAccessException
- If the destination is not of type DestinationType.HTTP or there is an issue while accessing destination information.
-
getRequestUri
@Nonnull protected URI getRequestUri(@Nonnull HttpDestination destination, @Nonnull SerializedRequest<RequestT> serializedRequest) Deprecated.Get the request URI.- Parameters:
destination
- The destination which is used for the HTTP request.serializedRequest
- The serialized request payload.- Returns:
- The target request URI.
-
logReadAccessAttempt
Deprecated.Logs the read access attempt of the givenrequest
for the givendestination
.- Parameters:
request
- The request that attempted to read data.destination
- The destination that was used for the read attempt.
-
execute
@Nonnull public String execute(@Nonnull HttpDestination destination, @Nonnull SerializedRequest<RequestT> serializedRequest) throws RequestSerializationException, RequestExecutionException, DestinationNotFoundException, DestinationAccessException Deprecated.Executes the givenserializedRequest
as aHttpUriRequest
, returning the body of theHttpResponse
received.- Parameters:
destination
- TheHttpDestination
of this call.serializedRequest
- TheSerializedRequest
to execute.- Returns:
- The body of the response received by the given request.
- Throws:
RequestSerializationException
- If the request could not be serialized.RequestExecutionException
- If any Exception occured during execution of the request.DestinationNotFoundException
- If the Destination cannot be found.DestinationAccessException
- If the destination is not of type DestinationType.HTTP or there is an issue while accessing destination information.
-
getRequestBodyWithHeader
@Nonnull protected com.sap.cloud.sdk.s4hana.connectivity.ErpHttpRequestExecutor.RequestBodyWithHeader getRequestBodyWithHeader(HttpDestination destination, @Nonnull SerializedRequest<RequestT> request) Deprecated.Returns a wrapper object which encapsulates the HTTP request body and headers. This method can be overridden to manipulate the request before submitting, e.g. signing queries, adding timestamps.- Parameters:
destination
- TheHttpDestination
of this call.request
- TheRequest
to be executed.- Returns:
- The request body with header.
-
getMeasurements
Deprecated.
-