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
NuxeoAWSCredentialsProviderandNuxeoAWSRegionProviderbecause they fall back to the default AWS SDK lookup behavior if no Nuxeo configuration is available.- Since:
- 10.3
- See Also:
NuxeoAWSCredentialsProvider,NuxeoAWSRegionProvider
-
-
Field Summary
Fields Modifier and Type Field Description static StringXP_CONFIGURATION-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description AWSConfigurationServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureSSL(String id, com.amazonaws.ClientConfiguration config)Configures a client configuration with a custom socket factory.com.amazonaws.auth.AWSCredentialsgetAWSCredentials(String id)Gets the AWS Credentials for the given configuration.StringgetAWSRegion(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, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.aws.AWSConfigurationService
configureSSL, getAWSCredentials, getAWSRegion
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
XP_CONFIGURATION
public static final String XP_CONFIGURATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAWSCredentials
public com.amazonaws.auth.AWSCredentials getAWSCredentials(String id)
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
public String getAWSRegion(String id)
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, com.amazonaws.ClientConfiguration config)
Configures a client configuration with a custom socket factory.- Specified by:
configureSSLin interfaceAWSConfigurationService- Parameters:
id- the custom configuration idconfig- the configuration to enrich- Since:
- 2021.10
-
getSSLContext
protected SSLContext getSSLContext(AWSConfigurationDescriptor descriptor)
-
loadKeyStore
protected KeyStore loadKeyStore(String path, String password, String type) throws GeneralSecurityException, IOException
- Throws:
GeneralSecurityExceptionIOException
-
-