public class AttachmentResourceTranslatorSender extends Object implements ConditionalSender
AttachmentResourceTranslator
to transform attachments.
Once the attachments are transformed, this sender delegates to a real implementation
the sending of the message.ResourceResolver
,
NamedResource
Constructor and Description |
---|
AttachmentResourceTranslatorSender(AttachmentResourceTranslator translator,
MessageSender delegate)
Initialize the sender with the provided translator and decorated sender.
|
Modifier and Type | Method and Description |
---|---|
void |
send(Message message)
Sends the message.
|
boolean |
supports(Message message)
Indicates if the implementation is able to handle the provided message.
|
String |
toString() |
public AttachmentResourceTranslatorSender(AttachmentResourceTranslator translator, MessageSender delegate)
translator
- the translator implementation that will transform the attachments of
the messagedelegate
- The decorated sender will really send the messagepublic boolean supports(Message message)
ConditionalSender
supports
in interface ConditionalSender
message
- the message to check if it can be sent using this senderpublic void send(Message message) throws MessageException
MessageSender
send
in interface MessageSender
message
- the message to sendMessageException
- when the message couldn't be sentCopyright © 2017. All rights reserved.