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
AdaptrisMessageEncoder
create representations of wholeAdaptrisMessage
s, including metadata and unique ID. They also allowObjects
s to be decoded back toAdaptrisMessage
s. 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 AdaptrisMessage
readMessage(S source)
Decode the supplied Object into anAdaptrisMessage
object.void
writeMessage(AdaptrisMessage msg, T target)
Encode theAdaptrisMessage
object 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 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
-
readMessage
AdaptrisMessage readMessage(S source) throws CoreException
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
-
-