Package org.apache.camel.component.mail
Class SplitAttachmentsExpression
- java.lang.Object
-
- org.apache.camel.support.ExpressionSupport
-
- org.apache.camel.support.ExpressionAdapter
-
- org.apache.camel.component.mail.SplitAttachmentsExpression
-
- All Implemented Interfaces:
org.apache.camel.Expression
,org.apache.camel.Predicate
public class SplitAttachmentsExpression extends org.apache.camel.support.ExpressionAdapter
AExpression
which can be used to split aMailMessage
per attachment. For example if a mail message has 5 attachments, then this expression will return a List<Message> that contains 5Message
. The message is split:As a byte[] or String The attachments are split into new messages as the body. This allows the split messages to be easily used by other processors / routes, as many other camel components can work on the byte[] or String, e.g. it can be written to disk using camel-file.
-
-
Field Summary
Fields Modifier and Type Field Description static String
HEADER_NAME
-
Constructor Summary
Constructors Constructor Description SplitAttachmentsExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
evaluate(org.apache.camel.Exchange exchange)
-
Methods inherited from class org.apache.camel.support.ExpressionAdapter
assertionFailureMessage, evaluate, init
-
-
-
-
Field Detail
-
HEADER_NAME
public static final String HEADER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
evaluate
public Object evaluate(org.apache.camel.Exchange exchange)
- Overrides:
evaluate
in classorg.apache.camel.support.ExpressionSupport
-
-