Interface ProtocolSpec
-
- All Known Implementing Classes:
Ec2ProtocolSpec,JsonProtocolSpec,QueryProtocolSpec,XmlProtocolSpec
public interface ProtocolSpec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<com.squareup.javapoet.MethodSpec>additionalMethods()default com.squareup.javapoet.CodeBlockasyncExecutionHandler(IntermediateModel intermediateModel, OperationModel opModel)Execution handler invocation only differs for protocols that support streaming outputs (REST-JSON, REST-XML).default com.squareup.javapoet.CodeBlockasyncMarshaller(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory)Optional<com.squareup.javapoet.MethodSpec>createErrorResponseHandler()default Optional<com.squareup.javapoet.MethodSpec>createEventstreamErrorResponseHandler()default com.squareup.javapoet.CodeBlockcredentialType(OperationModel opModel, IntermediateModel model)default StringdiscoveredEndpoint(OperationModel opModel)Optional<com.squareup.javapoet.CodeBlock>errorResponseHandler(OperationModel opModel)default com.squareup.javapoet.TypeNameexecuteFutureValueType(OperationModel opModel, PoetExtension poetExtensions)com.squareup.javapoet.CodeBlockexecutionHandler(OperationModel opModel)default Class<? extends SyncClientHandler>getClientHandlerClass()default com.squareup.javapoet.TypeNamegetPojoResponseType(OperationModel opModel, PoetExtension poetExtensions)Gets the POJO response type for the operation.default StringhostPrefixExpression(OperationModel opModel)com.squareup.javapoet.MethodSpecinitProtocolFactory(IntermediateModel model)default StringpopulateHttpStatusCode(ShapeModel shapeModel, IntermediateModel model)com.squareup.javapoet.FieldSpecprotocolFactory(IntermediateModel model)default StringpublishMetrics()default StringpublishMetricsWhenComplete()default List<com.squareup.javapoet.CodeBlock>registerModeledExceptions(IntermediateModel model, PoetExtension poetExtensions)com.squareup.javapoet.CodeBlockresponseHandler(IntermediateModel model, OperationModel opModel)default com.squareup.javapoet.CodeBlockstreamingMarshallerCode(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller, String protocolFactory, boolean isAsync)default StringstreamingOutputWhenComplete(String responseHandlerName)Need to notify the response handler/response transformer if the future is completed exceptionally.default com.squareup.javapoet.CodeBlocksyncStreamingMarshaller(IntermediateModel model, OperationModel opModel, com.squareup.javapoet.ClassName marshaller)For sync streaming operations, wrap request marshaller inStreamingRequestMarshallerclass.
-
-
-
Method Detail
-
protocolFactory
com.squareup.javapoet.FieldSpec protocolFactory(IntermediateModel model)
-
initProtocolFactory
com.squareup.javapoet.MethodSpec initProtocolFactory(IntermediateModel model)
-
responseHandler
com.squareup.javapoet.CodeBlock responseHandler(IntermediateModel model, OperationModel opModel)
-
errorResponseHandler
Optional<com.squareup.javapoet.CodeBlock> errorResponseHandler(OperationModel opModel)
-
executionHandler
com.squareup.javapoet.CodeBlock executionHandler(OperationModel opModel)
-
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
default Class<? extends SyncClientHandler> getClientHandlerClass()
-
createErrorResponseHandler
Optional<com.squareup.javapoet.MethodSpec> createErrorResponseHandler()
-
createEventstreamErrorResponseHandler
default Optional<com.squareup.javapoet.MethodSpec> createEventstreamErrorResponseHandler()
-
additionalMethods
default List<com.squareup.javapoet.MethodSpec> additionalMethods()
-
registerModeledExceptions
default List<com.squareup.javapoet.CodeBlock> registerModeledExceptions(IntermediateModel model, PoetExtension poetExtensions)
-
populateHttpStatusCode
default String populateHttpStatusCode(ShapeModel shapeModel, IntermediateModel model)
-
hostPrefixExpression
default String hostPrefixExpression(OperationModel opModel)
-
discoveredEndpoint
default String discoveredEndpoint(OperationModel opModel)
-
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 inStreamingRequestMarshallerclass.
-
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
default String streamingOutputWhenComplete(String responseHandlerName)
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
default String publishMetricsWhenComplete()
-
publishMetrics
default String publishMetrics()
-
-