public interface AdaptrisMessageEncoder<T,S> extends AdaptrisMessageTranslator
Implementations of AdaptrisMessageEncoder
create representations
of whole AdaptrisMessage
s, including metadata and unique ID.
They also allow Objects
s to be decoded back to
AdaptrisMessage
s. Implementations can be configured such that
decoded messages may retain the original unique ID or get a new one.
Modifier and Type | Method and Description |
---|---|
AdaptrisMessage |
readMessage(S source)
Decode the supplied Object into an
AdaptrisMessage object. |
void |
writeMessage(AdaptrisMessage msg,
T target)
Encode the
AdaptrisMessage object and write it to the supplied
target |
currentMessageFactory, registerMessageFactory
void writeMessage(AdaptrisMessage msg, T target) throws CoreException
AdaptrisMessage
object and write it to the supplied
targetmsg
- the AdaptrisMessage
to be encodedtarget
- the destination to write to.CoreException
- wrapping any underlying Exceptions that may occurAdaptrisMessage readMessage(S source) throws CoreException
AdaptrisMessage
object.source
- the object to be decoded.AdaptrisMessage
created from the object.CoreException
- wrapping any underlying Exceptions that may occur