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 Details

    • setListener

      void setListener(MessageTokenizerListener listener)
      Sets the listener used to observer this MessageTokenizerListener implementation.
      Parameters:
      listener - the listener used to observer this MessageTokenizerListener implementation.
    • processData

      void processData(InputStream stream) throws SdkException
      Processes passed data. If passed data and any previously stored data represent a whole message the MessageParserListener.onMessageReady(T) method is invoked
      Parameters:
      stream - A InputStream instance containing the message data.
      Throws:
      IllegalArgumentException - the stream 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 message
      SdkException
    • clear

      void clear()
      Clears and temporary data stored in the tokenizer.