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 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 Details

    • writeMessage

      void writeMessage(AdaptrisMessage msg, T target) throws CoreException
      Encode the AdaptrisMessage object and write it to the supplied target
      Parameters:
      msg - the AdaptrisMessage to be encoded
      target - 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 an AdaptrisMessage object.
      Parameters:
      source - the object to be decoded.
      Returns:
      an AdaptrisMessage created from the object.
      Throws:
      CoreException - wrapping any underlying Exceptions that may occur