Package com.adaptris.aws.kms
Class AWSKMSServiceImpl
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.aws.kms.AWSKMSServiceImpl
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,ConnectedService,MessageEventGenerator,Service,StateManagedComponent
- Direct Known Subclasses:
EncryptDecrypt,SignatureService
public abstract class AWSKMSServiceImpl extends ServiceImp implements ConnectedService
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description AWSKMSServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.amazonaws.services.kms.AWSKMSClientawsClient()protected voidcloseService()AdaptrisConnectiongetConnection()The connection to AWS KMS.java.lang.StringgetKeyId()The ID of the key that you will be using.protected voidinitService()voidprepare()voidsetConnection(AdaptrisConnection connection)The connection to AWS KMS.voidsetKeyId(java.lang.String keyId)The ID of the key that you will be using.voidstart()voidstop()<T extends AWSKMSServiceImpl>
TwithConnection(AdaptrisConnection c)<T extends AWSKMSServiceImpl>
TwithKeyId(java.lang.String s)-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, doService, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
prepare
public void prepare() throws CoreException- Specified by:
preparein interfaceComponentLifecycleExtension- Throws:
CoreException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
start
public void start() throws CoreException- Specified by:
startin interfaceComponentLifecycle- Overrides:
startin classServiceImp- Throws:
CoreException
-
stop
public void stop()
- Specified by:
stopin interfaceComponentLifecycle- Overrides:
stopin classServiceImp
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
withConnection
public <T extends AWSKMSServiceImpl> T withConnection(AdaptrisConnection c)
-
withKeyId
public <T extends AWSKMSServiceImpl> T withKeyId(java.lang.String s)
-
awsClient
protected com.amazonaws.services.kms.AWSKMSClient awsClient() throws java.lang.Exception- Throws:
java.lang.Exception
-
getConnection
public AdaptrisConnection getConnection()
The connection to AWS KMS.- Specified by:
getConnectionin interfaceConnectedService
-
setConnection
public void setConnection(AdaptrisConnection connection)
The connection to AWS KMS.- Specified by:
setConnectionin interfaceConnectedService
-
getKeyId
public java.lang.String getKeyId()
The ID of the key that you will be using.To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/".
- Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- Alias name: alias/ExampleAlias
- arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
-
setKeyId
public void setKeyId(java.lang.String keyId)
The ID of the key that you will be using.To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. When using an alias name, prefix it with "alias/".
- Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- Alias name: alias/ExampleAlias
- arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
-
-