public class ObjectToMimeMessage extends StringToEmailMessage
Message
to a MuleMessage
, with support for attachmentsencoding, endpoint, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypes
PHASE_NAME
PHASE_NAME
PROPERTY_NAME
Constructor and Description |
---|
ObjectToMimeMessage() |
Modifier and Type | Method and Description |
---|---|
protected void |
addBodyPartHeaders(BodyPart part,
String name,
MuleMessage message) |
protected BodyPart |
getBodyPartForAttachment(DataHandler handler,
String name) |
protected BodyPart |
getPayloadBodyPart(Object payload,
String contentType) |
protected void |
setContent(Object payload,
Message msg,
String contentType,
MuleMessage message) |
void |
setUseInboundAttachments(boolean useInboundAttachments)
Set whether inbound attachments should be transformed into MIME parts
|
void |
setUseOutboundAttachments(boolean useOutboundAttachments)
Set whether outbound attachments should be transformed into MIME parts
|
Object |
transformMessage(MuleMessage message,
String outputEncoding)
Transform the message
|
evaluate, lookupProperty
checkReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transform
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, initialise, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transform
process
initialise
dispose
setName
getName
setMuleContext
setEndpoint
public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
AbstractMessageTransformer
transformMessage
in class StringToEmailMessage
TransformerException
protected void setContent(Object payload, Message msg, String contentType, MuleMessage message) throws Exception
setContent
in class StringToEmailMessage
Exception
protected void addBodyPartHeaders(BodyPart part, String name, MuleMessage message)
protected BodyPart getBodyPartForAttachment(DataHandler handler, String name) throws MessagingException
MessagingException
protected BodyPart getPayloadBodyPart(Object payload, String contentType) throws MessagingException, TransformerException, IOException
public void setUseInboundAttachments(boolean useInboundAttachments)
public void setUseOutboundAttachments(boolean useOutboundAttachments)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.