Interface MessageHandler<T extends Message<? extends MessageBuffer>>

Type Parameters:
T - the type of message to handle
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<T extends Message<? extends MessageBuffer>>
Represents a handler for processing messages.
Since:
2.9.2
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A message handler that belongs to a specific side (clientbound or serverbound).
    static enum 
    Represents the state after handling a message.
  • Method Summary

    Modifier and Type
    Method
    Description
    handle(T message, MessageDirection direction)
    Handles the given message in the specified direction.
  • Method Details

    • handle

      MessageHandler.State handle(T message, MessageDirection direction)
      Handles the given message in the specified direction.
      Parameters:
      message - the message to handle
      direction - the direction of the message
      Returns:
      the state after handling the message