public abstract class SdkStructuredJsonFactoryImpl extends Object implements SdkStructuredJsonFactory
SdkStructuredPlainJsonFactory.SDK_JSON_FACTORY
and SdkStructuredCborFactory.SDK_CBOR_FACTORY
.Constructor and Description |
---|
SdkStructuredJsonFactoryImpl(com.fasterxml.jackson.core.JsonFactory jsonFactory,
Map<Class<?>,com.ibm.cloud.objectstorage.transform.Unmarshaller<?,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext>> unmarshallers,
Map<com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext.UnmarshallerType,com.ibm.cloud.objectstorage.transform.Unmarshaller<?,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext>> customTypeUnmarshallers) |
Modifier and Type | Method and Description |
---|---|
JsonErrorResponseHandler |
createErrorResponseHandler(JsonErrorResponseMetadata jsonErrorResponseMetadata,
List<com.ibm.cloud.objectstorage.transform.JsonErrorUnmarshaller> errorUnmarshallers) |
JsonErrorResponseHandler |
createErrorResponseHandler(List<com.ibm.cloud.objectstorage.transform.JsonErrorUnmarshaller> errorUnmarshallers,
String customErrorCodeFieldName)
Returns the error response handler for handling a error response.
|
<T> JsonResponseHandler<T> |
createResponseHandler(JsonOperationMetadata operationMetadata,
com.ibm.cloud.objectstorage.transform.Unmarshaller<T,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext> responseUnmarshaller)
Returns the response handler to be used for handling a successfull 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. |
protected ErrorCodeParser |
getErrorCodeParser(String customErrorCodeFieldName) |
public SdkStructuredJsonFactoryImpl(com.fasterxml.jackson.core.JsonFactory jsonFactory, Map<Class<?>,com.ibm.cloud.objectstorage.transform.Unmarshaller<?,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext>> unmarshallers, Map<com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext.UnmarshallerType,com.ibm.cloud.objectstorage.transform.Unmarshaller<?,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext>> customTypeUnmarshallers)
public StructuredJsonGenerator createWriter(String contentType)
SdkStructuredJsonFactory
StructuredJsonGenerator
to be used for marshalling the request.createWriter
in interface SdkStructuredJsonFactory
contentType
- Content type to send for requests.protected abstract StructuredJsonGenerator createWriter(com.fasterxml.jackson.core.JsonFactory jsonFactory, String contentType)
public <T> JsonResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, com.ibm.cloud.objectstorage.transform.Unmarshaller<T,com.ibm.cloud.objectstorage.transform.JsonUnmarshallerContext> responseUnmarshaller)
SdkStructuredJsonFactory
createResponseHandler
in interface SdkStructuredJsonFactory
operationMetadata
- Additional context information about an operation to create the
appropriate response handler.public JsonErrorResponseHandler createErrorResponseHandler(JsonErrorResponseMetadata jsonErrorResponseMetadata, List<com.ibm.cloud.objectstorage.transform.JsonErrorUnmarshaller> errorUnmarshallers)
createErrorResponseHandler
in interface SdkStructuredJsonFactory
public JsonErrorResponseHandler createErrorResponseHandler(List<com.ibm.cloud.objectstorage.transform.JsonErrorUnmarshaller> errorUnmarshallers, String customErrorCodeFieldName)
SdkStructuredJsonFactory
createErrorResponseHandler
in interface SdkStructuredJsonFactory
errorUnmarshallers
- Response unmarshallers to unamrshall the error responses.protected ErrorCodeParser getErrorCodeParser(String customErrorCodeFieldName)
Copyright © 2024. All rights reserved.