/** * A supplier for the services base exception builder. This is used when we can't identify any modeled * exception to unmarshall into. * * @param exceptionBuilderSupplier Suppplier of the base service exceptions Builder. * @return This builder for method chaining. */ public SubclassT defaultServiceExceptionSupplier(Supplier<SdkPojo> exceptionBuilderSupplier) { this.defaultServiceExceptionSupplier = exceptionBuilderSupplier; return getSubclass(); }
public AwsS3ProtocolFactory build() { return new AwsS3ProtocolFactory(this); } }
public AwsXmlProtocolFactory build() { return new AwsXmlProtocolFactory(this); } }
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ExplicitPayloadAndHeadersException") .exceptionBuilderSupplier(ExplicitPayloadAndHeadersException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ImplicitPayloadException") .exceptionBuilderSupplier(ImplicitPayloadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EmptyModeledException") .exceptionBuilderSupplier(EmptyModeledException::builder).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(ProtocolRestXmlException::builder) .build(); }
/** * Creates an instance of {@link XmlProtocolMarshaller} to be used for marshalling the requess. * * @param operationInfo Info required to marshall the request */ public ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo) { return XmlProtocolMarshaller.builder() .endpoint(clientConfiguration.option(SdkClientOption.ENDPOINT)) .xmlGenerator(createGenerator(operationInfo)) .operationInfo(operationInfo) .build(); }
private AwsS3ProtocolFactory init() { return AwsS3ProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchUpload") .exceptionBuilderSupplier(NoSuchUploadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectAlreadyInActiveTierError") .exceptionBuilderSupplier(ObjectAlreadyInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyExists") .exceptionBuilderSupplier(BucketAlreadyExistsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchBucket") .exceptionBuilderSupplier(NoSuchBucketException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectNotInActiveTierError") .exceptionBuilderSupplier(ObjectNotInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyOwnedByYou") .exceptionBuilderSupplier(BucketAlreadyOwnedByYouException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchKey").exceptionBuilderSupplier(NoSuchKeyException::builder) .build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(S3Exception::builder).build(); }
public static Builder builder() { return new Builder(); }
public static Builder builder() { return new Builder(); }
private AwsXmlProtocolFactory init() { return AwsXmlProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("ExplicitPayloadAndHeadersException") .exceptionBuilderSupplier(ExplicitPayloadAndHeadersException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ImplicitPayloadException") .exceptionBuilderSupplier(ImplicitPayloadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("EmptyModeledException") .exceptionBuilderSupplier(EmptyModeledException::builder).build()) .clientConfiguration(clientConfiguration).defaultServiceExceptionSupplier(ProtocolRestXmlException::builder) .build(); } }
/** * Creates an instance of {@link XmlProtocolMarshaller} to be used for marshalling the requess. * * @param operationInfo Info required to marshall the request */ public ProtocolMarshaller<SdkHttpFullRequest> createProtocolMarshaller(OperationInfo operationInfo) { return XmlProtocolMarshaller.builder() .endpoint(clientConfiguration.option(SdkClientOption.ENDPOINT)) .xmlGenerator(createGenerator(operationInfo)) .operationInfo(operationInfo) .build(); }
private AwsS3ProtocolFactory init() { return AwsS3ProtocolFactory .builder() .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchUpload") .exceptionBuilderSupplier(NoSuchUploadException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectAlreadyInActiveTierError") .exceptionBuilderSupplier(ObjectAlreadyInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyExists") .exceptionBuilderSupplier(BucketAlreadyExistsException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchBucket") .exceptionBuilderSupplier(NoSuchBucketException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ObjectNotInActiveTierError") .exceptionBuilderSupplier(ObjectNotInActiveTierErrorException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("BucketAlreadyOwnedByYou") .exceptionBuilderSupplier(BucketAlreadyOwnedByYouException::builder).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("NoSuchKey").exceptionBuilderSupplier(NoSuchKeyException::builder) .build()).clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(S3Exception::builder).build(); }
/** * Sets the {@link SdkClientConfiguration} which contains the service endpoint. * * @param clientConfiguration Configuration of the client. * @return This builder for method chaining. */ public SubclassT clientConfiguration(SdkClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; return getSubclass(); }
public AwsS3ProtocolFactory build() { return new AwsS3ProtocolFactory(this); } }
public AwsXmlProtocolFactory build() { return new AwsXmlProtocolFactory(this); } }
public static Builder builder() { return new Builder(); }
public static Builder builder() { return new Builder(); }
/** * Sets the {@link SdkClientConfiguration} which contains the service endpoint. * * @param clientConfiguration Configuration of the client. * @return This builder for method chaining. */ public SubclassT clientConfiguration(SdkClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; return getSubclass(); }
/** * A supplier for the services base exception builder. This is used when we can't identify any modeled * exception to unmarshall into. * * @param exceptionBuilderSupplier Suppplier of the base service exceptions Builder. * @return This builder for method chaining. */ public SubclassT defaultServiceExceptionSupplier(Supplier<SdkPojo> exceptionBuilderSupplier) { this.defaultServiceExceptionSupplier = exceptionBuilderSupplier; return getSubclass(); }
/** * Registers a new modeled exception by the error code. * * @param errorMetadata metadata for unmarshalling the exceptions * @return This builder for method chaining. */ public final SubclassT registerModeledException(ExceptionMetadata errorMetadata) { modeledExceptions.add(errorMetadata); return getSubclass(); }
/** * Registers a new modeled exception by the error code. * * @param errorMetadata metadata for unmarshalling the exceptions * @return This builder for method chaining. */ public final SubclassT registerModeledException(ExceptionMetadata errorMetadata) { modeledExceptions.add(errorMetadata); return getSubclass(); }