Interface MessageHandler<T>

Type Parameters:
T - handled payload type
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>
Runs on Relay's dispatch executor, never on Paper's server thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(Message<T> message)
    Processes one decoded message.
  • Method Details

    • handle

      void handle(Message<T> message) throws Exception
      Processes one decoded message.
      Parameters:
      message - received message
      Throws:
      Exception - if processing fails; Relay records and logs the failure