Interface ProtocolSpec
- All Known Implementing Classes:
Ec2ProtocolSpec
,JsonProtocolSpec
,QueryProtocolSpec
,XmlProtocolSpec
public interface ProtocolSpec
-
Method Summary
Modifier and TypeMethodDescriptiondefault List
<com.squareup.javapoet.MethodSpec> default com.squareup.javapoet.CodeBlock
asyncExecutionHandler
(IntermediateModel intermediateModel, OperationModel opModel) Execution handler invocation only differs for protocols that support streaming outputs (REST-JSON, REST-XML).default com.squareup.javapoet.CodeBlock
asyncMarshaller
(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory) Optional
<com.squareup.javapoet.MethodSpec> default com.squareup.javapoet.CodeBlock
credentialType
(OperationModel opModel, IntermediateModel model) default String
discoveredEndpoint
(OperationModel opModel) Optional
<com.squareup.javapoet.CodeBlock> errorResponseHandler
(OperationModel opModel) default com.squareup.javapoet.TypeName
executeFutureValueType
(OperationModel opModel, PoetExtension poetExtensions) com.squareup.javapoet.CodeBlock
executionHandler
(OperationModel opModel) default Class
<? extends SyncClientHandler> default com.squareup.javapoet.TypeName
getPojoResponseType
(OperationModel opModel, PoetExtension poetExtensions) Gets the POJO response type for the operation.default String
hostPrefixExpression
(OperationModel opModel) com.squareup.javapoet.MethodSpec
default String
populateHttpStatusCode
(ShapeModel shapeModel, IntermediateModel model) com.squareup.javapoet.FieldSpec
protocolFactory
(IntermediateModel model) default String
default String
default List
<com.squareup.javapoet.CodeBlock> registerModeledExceptions
(IntermediateModel model, PoetExtension poetExtensions) com.squareup.javapoet.CodeBlock
responseHandler
(IntermediateModel model, OperationModel opModel) default com.squareup.javapoet.CodeBlock
streamingMarshallerCode
(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory, boolean isAsync) default String
streamingOutputWhenComplete
(String responseHandlerName) Need to notify the response handler/response transformer if the future is completed exceptionally.default com.squareup.javapoet.CodeBlock
syncStreamingMarshaller
(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller) For sync streaming operations, wrap request marshaller inStreamingRequestMarshaller
class.
-
Method Details
-
protocolFactory
-
initProtocolFactory
-
responseHandler
-
errorResponseHandler
-
executionHandler
-
asyncExecutionHandler
default com.squareup.javapoet.CodeBlock asyncExecutionHandler(IntermediateModel intermediateModel, OperationModel opModel) Execution handler invocation only differs for protocols that support streaming outputs (REST-JSON, REST-XML). -
getClientHandlerClass
-
createErrorResponseHandler
Optional<com.squareup.javapoet.MethodSpec> createErrorResponseHandler() -
additionalMethods
-
registerModeledExceptions
default List<com.squareup.javapoet.CodeBlock> registerModeledExceptions(IntermediateModel model, PoetExtension poetExtensions) -
populateHttpStatusCode
-
hostPrefixExpression
-
discoveredEndpoint
-
credentialType
default com.squareup.javapoet.CodeBlock credentialType(OperationModel opModel, IntermediateModel model) -
syncStreamingMarshaller
default com.squareup.javapoet.CodeBlock syncStreamingMarshaller(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller) For sync streaming operations, wrap request marshaller inStreamingRequestMarshaller
class. -
asyncMarshaller
default com.squareup.javapoet.CodeBlock asyncMarshaller(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory) -
streamingMarshallerCode
default com.squareup.javapoet.CodeBlock streamingMarshallerCode(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory, boolean isAsync) -
streamingOutputWhenComplete
Need to notify the response handler/response transformer if the future is completed exceptionally.- Parameters:
responseHandlerName
- Variable name of response handler customer passed in.- Returns:
- whenComplete to append to future.
-
executeFutureValueType
default com.squareup.javapoet.TypeName executeFutureValueType(OperationModel opModel, PoetExtension poetExtensions) -
getPojoResponseType
default com.squareup.javapoet.TypeName getPojoResponseType(OperationModel opModel, PoetExtension poetExtensions) Gets the POJO response type for the operation.- Parameters:
opModel
- Operation to get response type for.
-
publishMetricsWhenComplete
-
publishMetrics
-