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 TypeMethodDescriptionvoid
configureProxy
(software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Enriches the givenApacheHttpClient.Builder
with default proxy configuration.void
configureSSL
(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.AwsCredentials
Gets the AWS Credentials for the given configuration.software.amazon.awssdk.regions.Region
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
public void configureSSL(String id, software.amazon.awssdk.http.apache.ApacheHttpClient.Builder builder) Description copied from interface:AWSConfigurationService
Enriches the given client builder with an SSL socket factory from the given configuration.- Specified by:
configureSSL
in 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:AWSConfigurationService
Enriches the givenApacheHttpClient.Builder
with default proxy configuration.- Specified by:
configureProxy
in interfaceAWSConfigurationService
- Parameters:
builder
- the http client builder
-
getSSLContext
-
loadKeyStore
protected KeyStore loadKeyStore(String path, String password, String type) throws GeneralSecurityException, IOException - Throws:
GeneralSecurityException
IOException
-