Interface PacketListener<E>

Type Parameters:
E - dispatch event 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 PacketListener<E>
Callback invoked for a listener-bearing packet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onPacket(E event)
    Handles one dispatch-scoped event or frame.
  • Method Details

    • onPacket

      void onPacket(E event) throws Exception
      Handles one dispatch-scoped event or frame.
      Parameters:
      event - current event
      Throws:
      Exception - when listener processing fails