Class JaxbMessageParser<T extends MessageBase>
java.lang.Object
com.sportradar.livedata.sdk.proto.common.MessageParserBase<T>
com.sportradar.livedata.sdk.proto.common.JaxbMessageParser<T>
- All Implemented Interfaces:
- MessageParser<T>
A 
MessageParser implementation which uses JAXB to un-marshal the messages- 
Constructor SummaryConstructorsConstructorDescriptionJaxbMessageParser(JaxbBuilder builder, MessageTokenizer tokenizer) Initializes a new instance of theJaxbMessageParserclass.
- 
Method SummaryModifier and TypeMethodDescriptionGets the configured character encoding for the parser.protected voidonDataReady(InputStream stream) Processes the received data.protected voidunMarshallData(InputStream stream) When overridden in derived class it un-marshals thedata.Methods inherited from class com.sportradar.livedata.sdk.proto.common.MessageParserBaseclear, notifyMessageReady, processData, setListener
- 
Constructor Details- 
JaxbMessageParserInitializes a new instance of theJaxbMessageParserclass.- Parameters:
- builder- The- JaxbBuilderimplementation used to construct the- Unmarshallerinstances.
- tokenizer- The- MessageTokenizerimplementation used to tokenize received data, or a null reference.
- Throws:
- IllegalArgumentException- the- builderis a null reference or- bufferSizeis smaller than or equal to 0.
 
 
- 
- 
Method Details- 
unMarshallDataWhen overridden in derived class it un-marshals thedata.- Parameters:
- stream- A- InputStreaminstance containing message data.
- Throws:
- ProtocolException- the exception was thrown while un-marshaling the- data.
- SdkException
 
- 
onDataReadyProcesses the received data.- Specified by:
- onDataReadyin class- MessageParserBase<T extends MessageBase>
- Parameters:
- stream- A- InputStreamimplementation containing the received data.
- Throws:
- SdkException- thrown when an un-expected situation is encountered.
 
- 
getEncodingGets the configured character encoding for the parser.- Returns:
- - a string, i.e. UTF-8
 
 
-