RequestT
- The generic request type.RequestResultT
- The generic request result type.public abstract class AbstractRequestSerializer<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>> extends Object implements RequestSerializer<RequestT,RequestResultT>
Constructor and Description |
---|
AbstractRequestSerializer() |
Modifier and Type | Method and Description |
---|---|
RequestResultT |
deserialize(SerializedRequestResult<RequestT> requestResult)
Deserialize a request result.
|
protected abstract RequestResultT |
deserializeRequestResult(SerializedRequestResult<RequestT> serializedRequestResult)
Deserialize a request result.
|
SerializedRequest<RequestT> |
serialize(RequestT request)
Serialize a request.
|
protected abstract SerializedRequest<RequestT> |
serializeRequest(RequestT request)
Serialize a request.
|
@Nonnull public final SerializedRequest<RequestT> serialize(@Nonnull RequestT request) throws RequestSerializationException
RequestSerializer
serialize
in interface RequestSerializer<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
request
- The request to serialize.RequestSerializationException
- If there is an issue while serializing the request.@Nonnull public final RequestResultT deserialize(@Nonnull SerializedRequestResult<RequestT> requestResult) throws RequestSerializationException
RequestSerializer
deserialize
in interface RequestSerializer<RequestT extends Request<RequestT,RequestResultT>,RequestResultT extends RequestResult<RequestT,RequestResultT>>
requestResult
- The query result to deserialize.RequestSerializationException
- If there is an issue while deserializing the request.@Nonnull protected abstract SerializedRequest<RequestT> serializeRequest(@Nonnull RequestT request) throws Exception
RequestSerializationException
by serialize(Request)
.request
- The request to serialize.Exception
- If there is an issue while serializing the request.@Nonnull protected abstract RequestResultT deserializeRequestResult(@Nonnull SerializedRequestResult<RequestT> serializedRequestResult) throws Exception
RequestSerializationException
by deserialize(SerializedRequestResult)
.serializedRequestResult
- The request result payload to deserialize.Exception
- If there is an issue while serializing the request.Copyright © 2020 SAP SE. All rights reserved.