Class Request<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
java.lang.Object
com.sap.cloud.sdk.s4hana.connectivity.Request<RequestT,RequestResultT>
- Type Parameters:
RequestT
- The generic request type.RequestResultT
- The generic request result type.
- Direct Known Subclasses:
AbstractRemoteFunctionRequest
@Deprecated
public abstract class Request<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
extends Object
Deprecated.
This module will be discontinued, along with its classes and methods.
Common interface for ERP queries.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract RequestResultT
execute
(Destination destination) Deprecated.Executes a given request using the givenDestination
.abstract String
Deprecated.Returns the method name that originally constructed this ERP request.Deprecated.Set of HTTP headers to send to the underlying request executor.Deprecated.Custom execution duration threshold indicating that the request is long running.Deprecated.Returns a String representation of the data being accessed by this request.long
Deprecated.Represents an identifier that allows to correlate queries between the Cloud cloudplatform and the ERP.protected RequestT
getThis()
Deprecated.Get the current instance reference.void
setLongRunningRequestThreshold
(Duration longRunningRequestThreshold) Deprecated.Custom execution duration threshold indicating that the request is long running.withHeader
(Header header) Deprecated.Fluent method which adds a custom header to this request.withHeader
(String name, String value) Deprecated.Fluent method which adds a custom HTTP header to this request.withSameCustomHttpHeadersAs
(Request<?, ?> otherRequest) Deprecated.Fluent method which adds the custom headers from another request into this request.
-
Constructor Details
-
Request
protected Request()Deprecated.Default constructor.
-
-
Method Details
-
getConstructedByMethod
Deprecated.Returns the method name that originally constructed this ERP request.- Returns:
- The method name that originally constructed this ERP request. This information is used for debugging.
-
getReadAccessData
Deprecated.Returns a String representation of the data being accessed by this request. If present, an audit log entry is written using the given data.- Returns:
- A optional String representation of the data being access by this request. If present, an audit log entry is written using the given data.
-
getThis
Deprecated.Get the current instance reference.- Returns:
- The current object.
-
withHeader
Deprecated.Fluent method which adds a custom HTTP header to this request. Note that these headers will only be added to HTTP-based queries. If the header with the provided name already exists, the value is overwritten.- Parameters:
name
- Header parameter name.value
- Header parameter value.- Returns:
- The same
Request
instance, so that this method can be used again in a fluent API style.
-
withHeader
Deprecated.Fluent method which adds a custom header to this request. Note that these headers will only be added to HTTP-based queries. If the header with the provided name already exists, the value is overwritten.- Parameters:
header
- The custom header.- Returns:
- The same
Request
instance, so that this method can be used again in a fluent API style.
-
withSameCustomHttpHeadersAs
Deprecated.Fluent method which adds the custom headers from another request into this request. Note that these headers will only be added to HTTP-based queries. If any headers in the other request already exist in this request, the values will be overwritten.- Parameters:
otherRequest
- Other request to get header parameters from.- Returns:
- The same
Request
instance, so that this method can be used again in a fluent API style.
-
execute
@Nonnull public abstract RequestResultT execute(@Nonnull Destination destination) throws RequestSerializationException, RequestExecutionException, DestinationNotFoundException, DestinationAccessException Deprecated.Executes a given request using the givenDestination
.- Parameters:
destination
- TheDestination
to be used for request execution.- Returns:
- The executed request result.
- Throws:
RequestSerializationException
- If there is an issue while serializing the request.RequestExecutionException
- If there is an issue while executing the request.DestinationNotFoundException
- If no destination with the name specified in theDestination
can be found.DestinationAccessException
- If there is an issue while accessing destination information.
-
getRequestId
public long getRequestId()Deprecated.Represents an identifier that allows to correlate queries between the Cloud cloudplatform and the ERP.Important: The identifier does not provide any guarantees with respect to persistence across the application lifecycle. In particular, the identifier will be reset to 1 when restarting the application.
-
getLongRunningRequestThreshold
Deprecated.Custom execution duration threshold indicating that the request is long running. -
setLongRunningRequestThreshold
Deprecated.Custom execution duration threshold indicating that the request is long running. -
getCustomHttpHeaders
Deprecated.Set of HTTP headers to send to the underlying request executor. Note that these headers will only be added to HTTP-based queries.
-