Interface RawHandshakeDataChannel
public interface RawHandshakeDataChannel
Represents a raw login data channel. This channel can only send
raw data to a
EngineConnection
during its handshake phase.-
Method Summary
Modifier and TypeMethodDescriptionparent()
Gets the parentRawDataChannel
.sendTo
(EngineConnection connection, Consumer<ChannelBuf> payload) Sends a request messageChannelBuf
to theEngineConnection
.<S extends EngineConnectionState>
voidsetRequestHandler
(Class<S> connectionState, RawHandshakeDataRequestHandler<? super S> handler) Sets theRawHandshakeDataRequestHandler
for the given connection type.void
Sets theRawHandshakeDataRequestHandler
on the both the client and server sides.
-
Method Details
-
parent
RawDataChannel parent()Gets the parentRawDataChannel
.- Returns:
- The raw data channel
-
setRequestHandler
<S extends EngineConnectionState> void setRequestHandler(Class<S> connectionState, RawHandshakeDataRequestHandler<? super S> handler) Sets theRawHandshakeDataRequestHandler
for the given connection type.- Type Parameters:
S
- The connection state- Parameters:
connectionState
- The connection state the handler should be used byhandler
- The handler to set
-
setRequestHandler
Sets theRawHandshakeDataRequestHandler
on the both the client and server sides.- Parameters:
handler
- The handler to set
-
sendTo
Sends a request messageChannelBuf
to theEngineConnection
.The
CompletableFuture
may fail exceptionally by aNoResponseException
if there wasn't a valid response received for the given request.- Parameters:
connection
- The client connection to send the request topayload
- The payload provider of the request- Returns:
- The completable future of the response
-