Interface MessageHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessageHandler
Functional interface for handling messages read from a buffer.
Since:
2024
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    onMessage(int msgTypeId, UnsafeBuffer buffer, int index, int length)
    Called for the processing of each message read from a buffer in turn.
  • Method Details

    • onMessage

      boolean onMessage(int msgTypeId, UnsafeBuffer buffer, int index, int length)
      Called for the processing of each message read from a buffer in turn.
      Parameters:
      msgTypeId - the type identifier of the message
      buffer - the buffer containing the message
      index - the starting index of the message in the buffer
      length - the length of the message in the buffer
      Returns:
      true if the consumed position should be committed, false otherwise