@ComponentProfile(summary="Hash the payload and store the hash against a metadata key", tag="service,metadata") public class PayloadHashingService extends ServiceImp
In the adapter configuration file this class is aliased as payload-hashing-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
PayloadHashingService() |
PayloadHashingService(java.lang.String hash,
java.lang.String metadataKey) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
ByteTranslator |
getByteTranslator() |
java.lang.String |
getHashAlgorithm() |
java.lang.String |
getMetadataKey() |
protected void |
initService() |
void |
prepare()
Prepare for initialisation.
|
void |
setByteTranslator(ByteTranslator t) |
void |
setHashAlgorithm(java.lang.String hashAlgorithm)
Set the hashing algorithm to use.
|
void |
setMetadataKey(java.lang.String metadataKey)
Set the metadata key against which the one way hash is stored.
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
public PayloadHashingService()
public PayloadHashingService(java.lang.String hash, java.lang.String metadataKey)
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public java.lang.String getHashAlgorithm()
public void setHashAlgorithm(java.lang.String hashAlgorithm)
hashAlgorithm
- the algorithm, for example SHA256public java.lang.String getMetadataKey()
public void setMetadataKey(java.lang.String metadataKey)
metadataKey
- the metadata keypublic void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public ByteTranslator getByteTranslator()
public void setByteTranslator(ByteTranslator t)