public interface AdaptrisMessageEncoder 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(java.lang.Object source)
Decode the supplied Object into an
AdaptrisMessage object. |
void |
writeMessage(AdaptrisMessage msg,
java.lang.Object target)
Encode the
AdaptrisMessage object and write it to the supplied
target |
currentMessageFactory, registerMessageFactory
void writeMessage(AdaptrisMessage msg, java.lang.Object 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(java.lang.Object source) throws CoreException
AdaptrisMessage
object.source
- the object to be decoded.AdaptrisMessage
created from the object.CoreException
- wrapping any underlying Exceptions that may occur