/** * Constructs the service and initialises the properties. * * @param credentials the S3 user credentials to use when communicating with S3, may be null in which case the * communication is done as an anonymous user. * @param invokingApplicationDescription a short description of the application using the service, suitable for inclusion in a * user agent string for REST/HTTP requests. Ideally this would include the application's * version number, for example: <code>Cockpit/0.7.3</code> or <code>My App Name/1.0</code> * @param credentialsProvider an implementation of the HttpClient CredentialsProvider interface, to provide a means for * prompting for credentials when necessary. * @param jets3tProperties JetS3t properties that will be applied within this service. */ public RestStorageService(ProviderCredentials credentials, String invokingApplicationDescription, CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) { super(credentials, invokingApplicationDescription, jets3tProperties); this.credentialsProvider = credentialsProvider; this.defaultStorageClass = getJetS3tProperties().getStringProperty( "s3service.default-storage-class", null); this.defaultServerSideEncryptionAlgorithm = getJetS3tProperties().getStringProperty( "s3service.server-side-encryption", null); this.regionEndpointCache = new RegionEndpointCache(); }
/** * Constructs the service and initialises the properties. * * @param credentials the S3 user credentials to use when communicating with S3, may be null in which case the * communication is done as an anonymous user. * @param invokingApplicationDescription a short description of the application using the service, suitable for inclusion in a * user agent string for REST/HTTP requests. Ideally this would include the application's * version number, for example: <code>Cockpit/0.7.3</code> or <code>My App Name/1.0</code> * @param credentialsProvider an implementation of the HttpClient CredentialsProvider interface, to provide a means for * prompting for credentials when necessary. * @param jets3tProperties JetS3t properties that will be applied within this service. */ public RestStorageService(ProviderCredentials credentials, String invokingApplicationDescription, CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) { super(credentials, invokingApplicationDescription, jets3tProperties); this.credentialsProvider = credentialsProvider; this.defaultStorageClass = getJetS3tProperties().getStringProperty( "s3service.default-storage-class", null); this.defaultServerSideEncryptionAlgorithm = getJetS3tProperties().getStringProperty( "s3service.server-side-encryption", null); this.regionEndpointCache = new RegionEndpointCache(); }