Package com.adaptris.core
Interface AdaptrisMessageEncoder<T,S>
- All Superinterfaces:
AdaptrisMessageTranslator
- All Known Implementing Classes:
AdaptrisMessageEncoderImp,FileBackedMimeEncoder,MimeEncoder,MimeEncoderImpl,MultiPayloadMessageMimeEncoder
Implementations of AdaptrisMessageEncoder create representations
of whole AdaptrisMessages, including metadata and unique ID.
They also allow Objectss to be decoded back to
AdaptrisMessages. Implementations can be configured such that
decoded messages may retain the original unique ID or get a new one.
-
Method Summary
Modifier and TypeMethodDescriptionreadMessage(S source) Decode the supplied Object into anAdaptrisMessageobject.voidwriteMessage(AdaptrisMessage msg, T target) Encode theAdaptrisMessageobject and write it to the supplied targetMethods inherited from interface com.adaptris.core.AdaptrisMessageTranslator
currentMessageFactory, registerMessageFactory
-
Method Details
-
writeMessage
Encode theAdaptrisMessageobject and write it to the supplied target- Parameters:
msg- theAdaptrisMessageto be encodedtarget- the destination to write to.- Throws:
CoreException- wrapping any underlying Exceptions that may occur
-
readMessage
Decode the supplied Object into anAdaptrisMessageobject.- Parameters:
source- the object to be decoded.- Returns:
- an
AdaptrisMessagecreated from the object. - Throws:
CoreException- wrapping any underlying Exceptions that may occur
-