Package gc.garcol.libcore
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.
Functional interface for handling messages read from a buffer.
- Since:
- 2024
-
Method Summary
Modifier and TypeMethodDescriptionbooleanonMessage(int msgTypeId, UnsafeBuffer buffer, int index, int length) Called for the processing of each message read from a buffer in turn.
-
Method Details
-
onMessage
Called for the processing of each message read from a buffer in turn.- Parameters:
msgTypeId- the type identifier of the messagebuffer- the buffer containing the messageindex- the starting index of the message in the bufferlength- the length of the message in the buffer- Returns:
- true if the consumed position should be committed, false otherwise
-