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
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureProxy
(com.amazonaws.ClientConfiguration config) Enriches the givenClientConfiguration
with default proxy configuration.void
configureSSL
(String id, com.amazonaws.ClientConfiguration config) Configures a client configuration with a custom socket factory.com.amazonaws.auth.AWSCredentials
Gets the AWS Credentials for the given configuration.getAWSRegion
(String id) Gets the AWS Region for the given configuration.protected SSLContext
getSSLContext
(AWSConfigurationDescriptor descriptor) protected KeyStore
loadKeyStore
(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
getApplicationStartedOrder
-
Field Details
-
XP_CONFIGURATION
- See Also:
-
-
Constructor Details
-
AWSConfigurationServiceImpl
public AWSConfigurationServiceImpl()
-
-
Method Details
-
getAWSCredentials
Description copied from interface:AWSConfigurationService
Gets the AWS Credentials for the given configuration.- Specified by:
getAWSCredentials
in interfaceAWSConfigurationService
- Parameters:
id
- the configuration id, ornull
for the default- Returns:
- the AWS credentials, or
null
if not defined
-
getAWSRegion
Description copied from interface:AWSConfigurationService
Gets the AWS Region for the given configuration.- Specified by:
getAWSRegion
in interfaceAWSConfigurationService
- Parameters:
id
- the configuration id, ornull
for the default- Returns:
- the AWS Region, or
null
if not defined
-
configureSSL
Configures a client configuration with a custom socket factory.- Specified by:
configureSSL
in interfaceAWSConfigurationService
- Parameters:
id
- the custom configuration idconfig
- the configuration to enrich- Since:
- 2021.10
-
configureProxy
public void configureProxy(com.amazonaws.ClientConfiguration config) Description copied from interface:AWSConfigurationService
Enriches the givenClientConfiguration
with default proxy configuration.- Specified by:
configureProxy
in interfaceAWSConfigurationService
- Parameters:
config
- the configuration to enrich
-
getSSLContext
-
loadKeyStore
protected KeyStore loadKeyStore(String path, String password, String type) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-