@ComponentProfile(summary="Add a new payload to a multi-payload message", tag="multi-payload,multi,payload,add") public class AddPayloadService extends ServiceImp
<add-payload-service>
<unique-id>add-payload-unique-id</unique-id>
<new-payload-id>payload-2</new-payload-id>
<new-payload class="file-data-input-parameter">
<destination class="configured-destination">
<destination><!-- path to file to include as new payload --></destination>
</destination>
</new-payload>
</add-payload-service>
Constructor and Description |
---|
AddPayloadService() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService()
.
|
void |
doService(AdaptrisMessage msg)
Add a new payload to the message.
|
DataInputParameter<java.lang.String> |
getNewPayload()
Get the source of the new payload.
|
java.lang.String |
getNewPayloadEncoding()
Get the encoding for the new payload.
|
java.lang.String |
getNewPayloadId()
Get the ID of the payload to add.
|
protected void |
initService()
.
|
void |
prepare()
Prepare for initialisation.
|
void |
setNewPayload(DataInputParameter<java.lang.String> newPayload)
Set the source of the new payload.
|
void |
setNewPayloadEncoding(java.lang.String newPayloadEncoding)
Set the encoding for the new payload, if it's a String.
|
void |
setNewPayloadId(java.lang.String newPayloadId)
Set the ID of the payload to add.
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
public void setNewPayloadId(java.lang.String newPayloadId)
newPayloadId
- The new payload ID.public java.lang.String getNewPayloadId()
public void setNewPayload(DataInputParameter<java.lang.String> newPayload)
newPayload
- The new payload.public DataInputParameter<java.lang.String> getNewPayload()
public void setNewPayloadEncoding(java.lang.String newPayloadEncoding)
newPayloadEncoding
- The payload encoding.public java.lang.String getNewPayloadEncoding()
public void doService(AdaptrisMessage msg) throws ServiceException
Apply the service to the message.
.msg
- The message to which the payload should be added.ServiceException
- wrapping any underlying Exception
sprotected void initService()
initService
in class ServiceImp
protected void closeService()
closeService
in class ServiceImp
public void prepare()