public class CopyTransformer extends java.lang.Object implements MessageTransformer
| Constructor and Description |
|---|
CopyTransformer() |
CopyTransformer(boolean copySecuritySubject,
boolean copyContent,
boolean copyProperties,
boolean copyAttachments) |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyAttachments(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies the attachments from a message to another message
|
static void |
copyProperties(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies all of the properties from one message to another
|
static void |
copySecuritySubject(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Copies the subject from a message to another message
|
static CopyTransformer |
getInstance()
Returns the singleton instance
|
boolean |
isCopyAttachments() |
boolean |
isCopyProperties() |
boolean |
isCopySecuritySubject() |
void |
setCopyAttachments(boolean copyAttachments) |
void |
setCopyProperties(boolean copyProperties) |
void |
setCopySecuritySubject(boolean copySecuritySubject) |
javax.jbi.messaging.NormalizedMessage |
transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
Transforms an input message into the returned output message
|
boolean |
transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
Transfers the state in the input message into the output message
|
public CopyTransformer()
public CopyTransformer(boolean copySecuritySubject,
boolean copyContent,
boolean copyProperties,
boolean copyAttachments)
public boolean isCopyAttachments()
public void setCopyAttachments(boolean copyAttachments)
copyAttachments - the copyAttachments to setpublic boolean isCopyProperties()
public void setCopyProperties(boolean copyProperties)
copyProperties - the copyProperties to setpublic boolean isCopySecuritySubject()
public void setCopySecuritySubject(boolean copySecuritySubject)
copySecuritySubject - the copySecuritySubject to setpublic static CopyTransformer getInstance()
public boolean transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
MessageTransformertransform in interface MessageTransformerexchange - the exchange on which the messages are flowingfrom - the input messageto - an empty out message ready to contain the result of the transformationjavax.jbi.messaging.MessagingExceptionpublic javax.jbi.messaging.NormalizedMessage transform(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
throws javax.jbi.messaging.MessagingException
MessageTransformertransform in interface MessageTransformerexchange - the exchange fon which the messages are flowingin - the input messagenull if the output message cojavax.jbi.messaging.MessagingException - when an error occurs while transforming the messagepublic static void copyProperties(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
from - the message containing the propertiesto - the destination messages where the properties are setpublic static void copyAttachments(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
from - the message with the attachmentsto - the message to which attachments are addedjavax.jbi.messaging.MessagingException - if an attachment could not be addedpublic static void copySecuritySubject(javax.jbi.messaging.NormalizedMessage from,
javax.jbi.messaging.NormalizedMessage to)
throws javax.jbi.messaging.MessagingException
from - the message with the subjectto - the message to which the subject is addedjavax.jbi.messaging.MessagingException - if an attachment could not be addedCopyright © 2005-2014 FuseSource. All Rights Reserved.