Class JaxbMessageWriter<T extends MessageBase>
java.lang.Object
com.sportradar.livedata.sdk.proto.common.JaxbMessageWriter<T>
- All Implemented Interfaces:
- MessageWriter<T>
A 
MessageWriter implementation which uses JAXB to marshal the messages- Author:
- uros.bregar
- 
Constructor SummaryConstructorsConstructorDescriptionJaxbMessageWriter(JaxbBuilder builder) Initializes a new instance of theJaxbMessageWriterclass.
- 
Method SummaryModifier and TypeMethodDescriptionGets the configured character encoding for the writer.byte[]Writes the passedmessageto the returnedbyte[]
- 
Constructor Details- 
JaxbMessageWriterInitializes a new instance of theJaxbMessageWriterclass.- Parameters:
- builder- the builder used to build requeired- Marshallerinstances.
- Throws:
- IllegalArgumentException- The- builderis a null reference
 
 
- 
- 
Method Details- 
writeWrites the passedmessageto the returnedbyte[]- Specified by:
- writein interface- MessageWriter<T extends MessageBase>
- Parameters:
- message- The message to be written to the array.
- Returns:
- The byte[]containing message data.
- Throws:
- MessageException- The- messagecould not be written to specified media
- ProtocolException- thrown when an un-expected situation is encountered.
 
- 
getEncodingGets the configured character encoding for the writer.- Specified by:
- getEncodingin interface- MessageWriter<T extends MessageBase>
- Returns:
- - a string, i.e. UTF-8
 
 
-