Interface MessageWriter<T extends MessageBase>

  • Type Parameters:
    T - Specifies the type of the messages recognized by the writer.
    All Known Implementing Classes:
    JaxbMessageWriter

    public interface MessageWriter<T extends MessageBase>
    Represents a writer capable of writing message data to byte array
    • Method Detail

      • write

        byte[] write​(T message)
              throws ProtocolException,
                     MessageException
        Writes the passed message to the returned byte[]
        Parameters:
        message - The message to be written to the array.
        Returns:
        The byte[] containing message data.
        Throws:
        ProtocolException - thrown when an un-expected situation is encountered.
        MessageException - The message could not be written to specified media
      • getEncoding

        String getEncoding()
        Gets the configured character encoding for the writer.
        Returns:
        a string, i.e. UTF-8