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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Clears and temporary data stored in the tokenizer.void
processData(InputStream stream)
Processes passed data.void
setListener(MessageTokenizerListener listener)
Sets the listener used to observer thisMessageTokenizerListener
implementation.
-
-
-
Method Detail
-
setListener
void setListener(MessageTokenizerListener listener)
Sets the listener used to observer thisMessageTokenizerListener
implementation.- Parameters:
listener
- the listener used to observer thisMessageTokenizerListener
implementation.
-
processData
void processData(InputStream stream) throws SdkException
Processes passed data. If passed data and any previously stored data represent a whole message theMessageParserListener.onMessageReady(T)
method is invoked- Parameters:
stream
- AInputStream
instance containing the message data.- Throws:
IllegalArgumentException
- thestream
is 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.
-
-