public abstract class SdkStructuredJsonFactoryImpl extends java.lang.Object implements SdkStructuredJsonFactory
SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY
and SdkStructuredCborFactory.SDK_CBOR_FACTORY
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
contentTypePrefix |
private com.fasterxml.jackson.core.JsonFactory |
jsonFactory |
private java.util.Map<java.lang.Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> |
unmarshallers |
Constructor and Description |
---|
SdkStructuredJsonFactoryImpl(java.lang.String contentTypePrefix,
com.fasterxml.jackson.core.JsonFactory jsonFactory,
java.util.Map<java.lang.Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> unmarshallers) |
Modifier and Type | Method and Description |
---|---|
JsonErrorResponseHandler |
createErrorResponseHandler(java.util.List<JsonErrorUnmarshaller> errorUnmarshallers,
java.lang.String customErrorCodeFieldName)
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 successfull response.
|
protected abstract StructuredJsonGenerator |
createWriter(com.fasterxml.jackson.core.JsonFactory jsonFactory,
java.lang.String contentType) |
StructuredJsonGenerator |
createWriter(java.lang.String protocolVersion)
Returns the
StructuredJsonGenerator to be used for marshalling the request. |
private JsonErrorCodeParser |
getErrorCodeParser(java.lang.String customErrorCodeFieldName) |
private final java.lang.String contentTypePrefix
private final com.fasterxml.jackson.core.JsonFactory jsonFactory
private final java.util.Map<java.lang.Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> unmarshallers
public SdkStructuredJsonFactoryImpl(java.lang.String contentTypePrefix, com.fasterxml.jackson.core.JsonFactory jsonFactory, java.util.Map<java.lang.Class<?>,Unmarshaller<?,JsonUnmarshallerContext>> unmarshallers)
public StructuredJsonGenerator createWriter(java.lang.String protocolVersion)
SdkStructuredJsonFactory
StructuredJsonGenerator
to be used for marshalling the request.createWriter
in interface SdkStructuredJsonFactory
protocolVersion
- AWS JSON/CBOR protocol version.protected abstract StructuredJsonGenerator createWriter(com.fasterxml.jackson.core.JsonFactory jsonFactory, java.lang.String contentType)
public <T> JsonResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Unmarshaller<T,JsonUnmarshallerContext> responseUnmarshaller)
SdkStructuredJsonFactory
createResponseHandler
in interface SdkStructuredJsonFactory
operationMetadata
- Additional context information about an operation to create the
appropriate response handler.public JsonErrorResponseHandler createErrorResponseHandler(java.util.List<JsonErrorUnmarshaller> errorUnmarshallers, java.lang.String customErrorCodeFieldName)
SdkStructuredJsonFactory
createErrorResponseHandler
in interface SdkStructuredJsonFactory
errorUnmarshallers
- Response unmarshallers to unamrshall the error responses.private JsonErrorCodeParser getErrorCodeParser(java.lang.String customErrorCodeFieldName)