Module id.ICE

Class FixedLengthMessageScanner

  • All Implemented Interfaces:

    public class FixedLengthMessageScanner
    extends Object
    implements MessageScanner
    This scanner is useful when all incoming messages have fixed length.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int scan​(ByteBuffer buf)  
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FixedLengthMessageScanner

        public FixedLengthMessageScanner​(int messageLength)
    • Method Detail

      • scan

        public int scan​(ByteBuffer buf)
        Specified by:
        scan in interface MessageScanner
        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.