Class BaseAwsJsonProtocolFactory
- java.lang.Object
- 
- software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory
 
- 
- Direct Known Subclasses:
- AwsJsonProtocolFactory
 
 public abstract class BaseAwsJsonProtocolFactory extends Object 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classBaseAwsJsonProtocolFactory.Builder<SubclassT extends BaseAwsJsonProtocolFactory.Builder>Builder forAwsJsonProtocolFactory.
 - 
Field SummaryFields Modifier and Type Field Description protected static JsonContentTypeResolverAWS_JSONContent type resolver implementation for plain text AWS_JSON services.static OperationMetadataAttribute<Boolean>GENERATES_BODYUsed by operations that do not serialize the input, e.g., when the input is not defined in the model.static OperationMetadataAttribute<Map<String,String>>HTTP_EXTRA_HEADERSAttribute for a protocol to configure extra headers for the operation.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedBaseAwsJsonProtocolFactory(BaseAwsJsonProtocolFactory.Builder<?> builder)
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
GENERATES_BODYpublic static final OperationMetadataAttribute<Boolean> GENERATES_BODY Used by operations that do not serialize the input, e.g., when the input is not defined in the model. RPCv2 uses it.
 - 
HTTP_EXTRA_HEADERSpublic static final OperationMetadataAttribute<Map<String,String>> HTTP_EXTRA_HEADERS Attribute for a protocol to configure extra headers for the operation.
 - 
AWS_JSONprotected static final JsonContentTypeResolver AWS_JSON Content type resolver implementation for plain text AWS_JSON services.
 
- 
 - 
Constructor Detail- 
BaseAwsJsonProtocolFactoryprotected BaseAwsJsonProtocolFactory(BaseAwsJsonProtocolFactory.Builder<?> builder) 
 
- 
 - 
Method Detail- 
createResponseHandlerpublic final <T extends SdkPojo> HttpResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Supplier<SdkPojo> pojoSupplier) Creates a new response handler with the givenJsonOperationMetadataand a supplier of the POJO response type.- Type Parameters:
- T- Type being unmarshalled.
- Parameters:
- operationMetadata- Metadata about operation being unmarshalled.
- pojoSupplier-- Supplierof the POJO response type.
- Returns:
- HttpResponseHandler that will handle the HTTP response and unmarshall into a POJO.
 
 - 
createResponseHandlerpublic final <T extends SdkPojo> HttpResponseHandler<T> createResponseHandler(JsonOperationMetadata operationMetadata, Function<SdkHttpFullResponse,SdkPojo> pojoSupplier) Creates a new response handler with the givenJsonOperationMetadataand a supplier of the POJO response type.- Type Parameters:
- T- Type being unmarshalled.
- Parameters:
- operationMetadata- Metadata about operation being unmarshalled.
- pojoSupplier-- Supplierof the POJO response type. Has access to the HTTP response, primarily for polymorphic deserialization as seen in event stream (i.e. unmarshalled event depends on ':event-type' header).
- Returns:
- HttpResponseHandler that will handle the HTTP response and unmarshall into a POJO.
 
 - 
createErrorResponseHandler@Deprecated public final HttpResponseHandler<AwsServiceException> createErrorResponseHandler(JsonOperationMetadata errorResponseMetadata) Deprecated.Users should favor usingcreateErrorResponseHandler(JsonOperationMetadata, Function), which allows the creation of an error unmarshaller that uses a mapping function to map from error code to the associatedExceptionMetadata.Creates a response handler for handling a error response (non 2xx response).
 - 
createErrorResponseHandlerpublic final HttpResponseHandler<AwsServiceException> createErrorResponseHandler(JsonOperationMetadata errorResponseMetadata, Function<String,Optional<ExceptionMetadata>> exceptionMetadataSupplier) 
 - 
getContentTypepublic final String getContentType() 
 - 
getContentTypeResolverprotected JsonContentTypeResolver getContentTypeResolver() - Returns:
- Content type resolver implementation to use.
 
 - 
getSdkFactoryprotected StructuredJsonFactory getSdkFactory() - Returns:
- Instance of StructuredJsonFactoryto use in creating handlers.
 
 - 
getDefaultTimestampFormatsprotected Map<MarshallLocation,TimestampFormatTrait.Format> getDefaultTimestampFormats() - Returns:
- The default timestamp format for unmarshalling for each location in the response. This can be overridden by subclasses to customize behavior.
 
 - 
createProtocolMarshallerpublic final ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo) 
 
- 
 
-