Interface RawHandshakeDataChannel
-
public interface RawHandshakeDataChannel
Represents a raw login data channel. This channel can only send raw data to aEngineConnection
during its handshake phase.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RawDataChannel
parent()
Gets the parentRawDataChannel
.java.util.concurrent.CompletableFuture<ChannelBuf>
sendTo(EngineConnection connection, java.util.function.Consumer<ChannelBuf> payload)
Sends a request messageChannelBuf
to theEngineConnection
.<C extends EngineConnection>
voidsetRequestHandler(java.lang.Class<C> connectionType, RawHandshakeDataRequestHandler<? super C> handler)
Sets theRawHandshakeDataRequestHandler
for the given connection type.void
setRequestHandler(RawHandshakeDataRequestHandler<EngineConnection> handler)
Sets theRawHandshakeDataRequestHandler
on the both the client and server sides.<C extends EngineConnection>
voidsetRequestHandler(EngineConnectionSide<C> side, RawHandshakeDataRequestHandler<? super C> handler)
Sets theRawHandshakeDataRequestHandler
on the given connection side.
-
-
-
Method Detail
-
parent
RawDataChannel parent()
Gets the parentRawDataChannel
.- Returns:
- The raw data channel
-
setRequestHandler
<C extends EngineConnection> void setRequestHandler(EngineConnectionSide<C> side, RawHandshakeDataRequestHandler<? super C> handler)
Sets theRawHandshakeDataRequestHandler
on the given connection side.- Type Parameters:
C
- The connection type- Parameters:
side
- The connection side the handler should be set onhandler
- The handler to set
-
setRequestHandler
<C extends EngineConnection> void setRequestHandler(java.lang.Class<C> connectionType, RawHandshakeDataRequestHandler<? super C> handler)
Sets theRawHandshakeDataRequestHandler
for the given connection type.- Type Parameters:
C
- The connection type- Parameters:
connectionType
- The connection type the handler should be used byhandler
- The handler to set
-
setRequestHandler
void setRequestHandler(RawHandshakeDataRequestHandler<EngineConnection> handler)
Sets theRawHandshakeDataRequestHandler
on the both the client and server sides.- Parameters:
handler
- The handler to set
-
sendTo
java.util.concurrent.CompletableFuture<ChannelBuf> sendTo(EngineConnection connection, java.util.function.Consumer<ChannelBuf> payload)
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
-
-