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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getEncoding()
Gets the configured character encoding for the writer.byte[]
write(T message)
Writes the passed message to the returnedbyte[]
-
-
-
Method Detail
-
write
byte[] write(T message) throws ProtocolException, MessageException
Writes the passed message to the returnedbyte[]
- 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
- Themessage
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
-
-