Interface MessageTokenizer
- All Known Implementing Classes:
IncrementalMessageTokenizer,MessageTokenizerBase
public interface MessageTokenizer
Represents a message parser used to parse received byte arrays into messages of specified type
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears and temporary data stored in the tokenizer.voidprocessData(InputStream stream) Processes passed data.voidsetListener(MessageTokenizerListener listener) Sets the listener used to observer thisMessageTokenizerListenerimplementation.
-
Method Details
-
setListener
Sets the listener used to observer thisMessageTokenizerListenerimplementation.- Parameters:
listener- the listener used to observer thisMessageTokenizerListenerimplementation.
-
processData
Processes passed data. If passed data and any previously stored data represent a whole message theMessageParserListener.onMessageReady(T)method is invoked- Parameters:
stream- AInputStreaminstance containing the message data.- Throws:
IllegalArgumentException- thestreamis a null reference.ProtocolException- the data could not be processed either because the buffer is full, an un-expected character was encountered or there was an error while un-marshalling the messageSdkException
-
clear
void clear()Clears and temporary data stored in the tokenizer.
-