Interface RequestPacketResponse<R extends Packet>

Type Parameters:
R - The response packet type

public interface RequestPacketResponse<R extends Packet>
Represents a callback for the response of a request packet.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the response of the request packet as failed with the given ChannelException.
    void
    success(R response)
    Sets the response of the request packet as success with the given response packet.
  • Method Details

    • fail

      void fail(ChannelException exception)
      Sets the response of the request packet as failed with the given ChannelException.

      If this response fails, then will other side of the connection end up with a NoResponseException.

      Parameters:
      exception - The exception
    • success

      void success(R response)
      Sets the response of the request packet as success with the given response packet.
      Parameters:
      response - The response packet