public abstract class BaseSdkStructuredJsonFactory extends Object implements SdkStructuredJsonFactory
Constructor and Description |
---|
BaseSdkStructuredJsonFactory(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Map<Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> unmarshallers) |
Modifier and Type | Method and Description |
---|---|
SdkJsonErrorResponseHandler |
createErrorResponseHandler(List<SdkJsonErrorUnmarshaller> errorUnmarshallers)
Returns the error response handler for handling a error response.
|
<T> JsonResponseHandler<T> |
createResponseHandler(JsonOperationMetadata operationMetadata,
Unmarshaller<T,JsonUnmarshallerContext> responseUnmarshaller)
Returns the response handler to be used for handling a successful response.
|
protected abstract StructuredJsonGenerator |
createWriter(com.fasterxml.jackson.core.JsonFactory jsonFactory,
String contentType) |
StructuredJsonGenerator |
createWriter(String contentType)
Returns the
StructuredJsonGenerator to be used for marshalling the request. |
public BaseSdkStructuredJsonFactory(com.fasterxml.jackson.core.JsonFactory jsonFactory, Map<Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> unmarshallers)
public StructuredJsonGenerator createWriter(String contentType)
StructuredJsonFactory
StructuredJsonGenerator
to be used for marshalling the request.createWriter
in interface StructuredJsonFactory
contentType
- Content type to send for requests.public <T> JsonResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Unmarshaller<T,JsonUnmarshallerContext> responseUnmarshaller)
StructuredJsonFactory
createResponseHandler
in interface StructuredJsonFactory
operationMetadata
- Additional context information about an operation to create the
appropriate response handler.public SdkJsonErrorResponseHandler createErrorResponseHandler(List<SdkJsonErrorUnmarshaller> errorUnmarshallers)
SdkStructuredJsonFactory
createErrorResponseHandler
in interface SdkStructuredJsonFactory
errorUnmarshallers
- Response unmarshallers to unamrshall the error responses.protected abstract StructuredJsonGenerator createWriter(com.fasterxml.jackson.core.JsonFactory jsonFactory, String contentType)
Copyright © 2018. All rights reserved.