Interface PacketHandler

All Known Implementing Classes:
PacketHandlers
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 PacketHandler
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Handles a packet.
    Returns a new packet handler that runs the provided handler after this one.
  • Method Details

    • handle

      void handle(PacketWrapper wrapper) throws InformativeException
      Handles a packet.
      Parameters:
      wrapper - packet wrapper
      Throws:
      InformativeException
    • then

      default PacketHandler then(PacketHandler handler)
      Returns a new packet handler that runs the provided handler after this one.
      Parameters:
      handler - packet handler to run aftet this one
      Returns:
      a new packet handler that runs the provided handler after this one