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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
fail(ChannelException exception)
Sets the response of the request packet as failed with the givenChannelException
.void
success(R response)
Sets the response of the request packet as success with the given response packet.
-
-
-
Method Detail
-
fail
void fail(ChannelException exception)
Sets the response of the request packet as failed with the givenChannelException
.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
-
-