Class MessageTokenizerBase
java.lang.Object
com.sportradar.livedata.sdk.proto.common.MessageTokenizerBase
- All Implemented Interfaces:
- MessageTokenizer
- Direct Known Subclasses:
- IncrementalMessageTokenizer
Represents a message tokenizer base.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected MessageTokenizerListenerAMessageTokenizerListenerimplementation used to observe currentMessageTokenizerBaseclass.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidnotifyListener(InputStream stream) Notifies the observer that data was tokenized.abstract voidprocessData(InputStream stream) Processes passed data.voidsetListener(MessageTokenizerListener listener) Sets the listener used to observer thisMessageTokenizerListenerimplementation.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sportradar.livedata.sdk.proto.common.MessageTokenizerclear
- 
Field Details- 
listenerAMessageTokenizerListenerimplementation used to observe currentMessageTokenizerBaseclass.
 
- 
- 
Constructor Details- 
MessageTokenizerBasepublic MessageTokenizerBase()
 
- 
- 
Method Details- 
setListenerSets the listener used to observer thisMessageTokenizerListenerimplementation.- Specified by:
- setListenerin interface- MessageTokenizer
- Parameters:
- listener- the listener used to observer this- MessageTokenizerListenerimplementation.
 
- 
processDataProcesses passed data. If passed data and any previously stored data represent a whole message theMessageTokenizerListener.onMessageReady(byte[])method is invoked- Specified by:
- processDatain interface- MessageTokenizer
- Parameters:
- stream- A- InputStreamcontaining data to be tokenized.
- Throws:
- IllegalArgumentException- the- streamis a null reference.
- ProtocolException- the data could not be processed either because the buffer is full
- SdkException
 
- 
notifyListenerNotifies the observer that data was tokenized.- Parameters:
- stream- A- InputStreaminstance containing the tokenized data.
- Throws:
- SdkException- thrown when an un-expected situation is encountered.
 
 
-