Package com.adaptris.core
Interface AdaptrisMessageEncoder<T,S>
-
- All Superinterfaces:
AdaptrisMessageTranslator
- All Known Implementing Classes:
AdaptrisMessageEncoderImp,FileBackedMimeEncoder,MimeEncoder,MimeEncoderImpl,MultiPayloadMessageMimeEncoder
public interface AdaptrisMessageEncoder<T,S> extends AdaptrisMessageTranslator
Implementations of
AdaptrisMessageEncodercreate representations of wholeAdaptrisMessages, including metadata and unique ID. They also allowObjectss to be decoded back toAdaptrisMessages. Implementations can be configured such that decoded messages may retain the original unique ID or get a new one.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AdaptrisMessagereadMessage(S source)Decode the supplied Object into anAdaptrisMessageobject.voidwriteMessage(AdaptrisMessage msg, T target)Encode theAdaptrisMessageobject and write it to the supplied target-
Methods inherited from interface com.adaptris.core.AdaptrisMessageTranslator
currentMessageFactory, registerMessageFactory
-
-
-
-
Method Detail
-
writeMessage
void writeMessage(AdaptrisMessage msg, T target) throws CoreException
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
AdaptrisMessage readMessage(S source) throws CoreException
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
-
-