Package com.adaptris.core
Class MultiPayloadMessageMimeEncoder
- java.lang.Object
-
- com.adaptris.core.AdaptrisMessageEncoderImp<T,S>
-
- com.adaptris.core.MimeEncoderImpl<java.io.OutputStream,java.io.InputStream>
-
- com.adaptris.core.MultiPayloadMessageMimeEncoder
-
- All Implemented Interfaces:
AdaptrisMessageEncoder<java.io.OutputStream,java.io.InputStream>
,AdaptrisMessageTranslator
@ComponentProfile(summary="A multi-payload message MIME encoder/decoder", tag="multi-payload,MIME,encode,decode", since="3.9.3") public class MultiPayloadMessageMimeEncoder extends MimeEncoderImpl<java.io.OutputStream,java.io.InputStream>
Multi-payload message MIME encoder. Encode a multi-payload message with each payload as a separate MIME block.<encoder class="com.adaptris.core.MultiPayloadMessageMimeEncoder"> <metadata-encoding>base64</metadata-encoding> <payload-encoding>base64</payload-encoding> <retain-unique-id>true</retain-unique-id> </encoder>
- Since:
- 3.9.3
- See Also:
MultiPayloadAdaptrisMessage
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.MimeEncoderImpl
EXCEPTION_CONTENT_ID, METADATA_CONTENT_ID, PAYLOAD_CONTENT_ID
-
Fields inherited from class com.adaptris.core.AdaptrisMessageEncoderImp
log
-
-
Constructor Summary
Constructors Constructor Description MultiPayloadMessageMimeEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addPartsToMessage(BodyPartIterator input, MultiPayloadAdaptrisMessage message)
protected javax.mail.internet.MimeBodyPart
payloadAsMimePart(MultiPayloadAdaptrisMessage m)
AdaptrisMessage
readMessage(java.io.InputStream source)
Decode the supplied Object into anAdaptrisMessage
object.void
writeMessage(AdaptrisMessage msg, java.io.OutputStream target)
Encode theAdaptrisMessage
object and write it to the supplied target-
Methods inherited from class com.adaptris.core.MimeEncoderImpl
addPartsToMessage, asMimePart, getMetadata, getMetadataEncoding, getMetadataSet, getPayloadEncoding, getRetainUniqueId, payloadAsMimePart, retainUniqueId, setMetadataEncoding, setPayloadEncoding, setRetainUniqueId
-
Methods inherited from class com.adaptris.core.AdaptrisMessageEncoderImp
currentMessageFactory, registerMessageFactory
-
-
-
-
Method Detail
-
writeMessage
public void writeMessage(AdaptrisMessage msg, java.io.OutputStream target) throws CoreException
Description copied from interface:AdaptrisMessageEncoder
Encode theAdaptrisMessage
object and write it to the supplied target- Parameters:
msg
- theAdaptrisMessage
to be encodedtarget
- the destination to write to.- Throws:
CoreException
- wrapping any underlying Exceptions that may occur
-
payloadAsMimePart
protected javax.mail.internet.MimeBodyPart payloadAsMimePart(MultiPayloadAdaptrisMessage m) throws java.lang.Exception
- Throws:
java.lang.Exception
-
readMessage
public AdaptrisMessage readMessage(java.io.InputStream source) throws CoreException
Description copied from interface:AdaptrisMessageEncoder
Decode the supplied Object into anAdaptrisMessage
object.- Parameters:
source
- the object to be decoded.- Returns:
- an
AdaptrisMessage
created from the object. - Throws:
CoreException
- wrapping any underlying Exceptions that may occur
-
addPartsToMessage
protected boolean addPartsToMessage(BodyPartIterator input, MultiPayloadAdaptrisMessage message) throws java.io.IOException, javax.mail.MessagingException
- Throws:
java.io.IOException
javax.mail.MessagingException
-
-