public class QueryServer extends GlowDatagramServer
bootstrap, grouplatch| Constructor and Description |
|---|
QueryServer(GlowServer server,
ProtocolProvider protocolProvider,
CountDownLatch latch,
boolean showPlugins)
Creates an instance for the specified server.
|
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.ChannelFuture |
bind(InetSocketAddress address)
Bind the server on the specified address.
|
void |
flushChallengeTokens()
Invalidates all challenge tokens.
|
int |
generateChallengeToken(InetSocketAddress address)
Generate a new token.
|
void |
onBindFailure(InetSocketAddress address,
Throwable t) |
void |
onBindSuccess(InetSocketAddress address) |
void |
shutdown()
Shut the query server down.
|
boolean |
verifyChallengeToken(InetSocketAddress address,
int token)
Verify that the request is using the correct challenge token.
|
getProtocolProvider, getServerpublic QueryServer(GlowServer server, ProtocolProvider protocolProvider, CountDownLatch latch, boolean showPlugins)
server - the associated GlowServerlatch - The countdown latch used during server startup to wait for network server
binding.showPlugins - whether the plugin list should be included in responsespublic io.netty.channel.ChannelFuture bind(InetSocketAddress address)
bind in class GlowDatagramServeraddress - The address.public void shutdown()
shutdown in class GlowDatagramServerpublic int generateChallengeToken(InetSocketAddress address)
address - The sender address.public boolean verifyChallengeToken(InetSocketAddress address, int token)
address - The sender address.token - The token.true if the token is valid.public void flushChallengeTokens()
public void onBindSuccess(InetSocketAddress address)
onBindSuccess in class GlowNetworkServerpublic void onBindFailure(InetSocketAddress address, Throwable t)
onBindFailure in class GlowNetworkServerCopyright © 2021. All rights reserved.