Package org.nuxeo.runtime.aws
Class AWSConfigurationServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.runtime.aws.AWSConfigurationServiceImpl
- All Implemented Interfaces:
AWSConfigurationService,Adaptable,Component,Extensible,TimestampedService
public class AWSConfigurationServiceImpl
extends DefaultComponent
implements AWSConfigurationService
Implementation of the service providing AWS configuration.
This service does a simple lookup in provided Nuxeo configuration. Instead of this service, you should probably use
NuxeoAWSCredentialsProvider and NuxeoAWSRegionProvider because they fall back to the default AWS SDK
lookup behavior if no Nuxeo configuration is available.
- Since:
- 10.3
- See Also:
-
Field Summary
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureProxy(software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Enriches the givenApacheHttpClient.Builderwith default proxy configuration.voidconfigureSSL(String id, software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Enriches the given client builder with an SSL socket factory from the given configuration.software.amazon.awssdk.auth.credentials.AwsCredentialsGets the AWS Credentials for the given configuration.software.amazon.awssdk.regions.RegiongetAwsRegion(String id) Gets the AWS Region for the given configuration.protected SSLContextgetSSLContext(AWSConfigurationDescriptor descriptor) protected KeyStoreloadKeyStore(String path, String password, String type) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.aws.AWSConfigurationService
configureSSL, getAwsCredentials, getAwsRegionMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
XP_CONFIGURATION
- See Also:
-
-
Constructor Details
-
AWSConfigurationServiceImpl
public AWSConfigurationServiceImpl()
-
-
Method Details
-
getAwsCredentials
Description copied from interface:AWSConfigurationServiceGets the AWS Credentials for the given configuration.- Specified by:
getAwsCredentialsin interfaceAWSConfigurationService- Parameters:
id- the configuration id, ornullfor the default- Returns:
- the AWS credentials, or
nullif not defined
-
getAwsRegion
Description copied from interface:AWSConfigurationServiceGets the AWS Region for the given configuration.- Specified by:
getAwsRegionin interfaceAWSConfigurationService- Parameters:
id- the configuration id, ornullfor the default- Returns:
- the AWS Region, or
nullif not defined
-
configureSSL
public void configureSSL(String id, software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Description copied from interface:AWSConfigurationServiceEnriches the given client builder with an SSL socket factory from the given configuration.- Specified by:
configureSSLin interfaceAWSConfigurationService- Parameters:
id- the custom configuration idbuilder- the http client builder
-
configureProxy
public void configureProxy(software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Description copied from interface:AWSConfigurationServiceEnriches the givenApacheHttpClient.Builderwith default proxy configuration.- Specified by:
configureProxyin interfaceAWSConfigurationService- Parameters:
builder- the http client builder
-
getSSLContext
-
loadKeyStore
protected KeyStore loadKeyStore(String path, String password, String type) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityExceptionIOException
-