Module id.ICE

Class VarLengthMessageScanner

Object
VarLengthMessageScanner
All Implemented Interfaces:
MessageScanner

public class VarLengthMessageScanner extends Object implements MessageScanner
This scanner treats all data which was written into the buffer so far as one single message. As the result such messages may have variable length.

Effectively message will consist from whatever ICE managed to receive from the client in one non blocking read operation.

  • Constructor Details

    • VarLengthMessageScanner

      public VarLengthMessageScanner()
  • Method Details

    • scan

      public int scan(ByteBuffer buf)
      Specified by:
      scan in interface MessageScanner
      Returns:
      message end position or -1 if message is not complete or not found in the buffer yet. If last byte of the message found on position n then the message end position will be considered as n + 1.