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>

public class JaxbMessageParser<T extends MessageBase> extends MessageParserBase<T>
A MessageParser implementation which uses JAXB to un-marshal the messages
  • Constructor Details

  • Method Details

    • unMarshallData

      protected void unMarshallData(InputStream stream) throws SdkException
      When overridden in derived class it un-marshals the data.
      Parameters:
      stream - A InputStream instance containing message data.
      Throws:
      ProtocolException - the exception was thrown while un-marshaling the data.
      SdkException
    • onDataReady

      protected void onDataReady(InputStream stream) throws SdkException
      Processes the received data.
      Specified by:
      onDataReady in class MessageParserBase<T extends MessageBase>
      Parameters:
      stream - A InputStream implementation containing the received data.
      Throws:
      SdkException - thrown when an un-expected situation is encountered.
    • getEncoding

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