public class QueryServer extends GlowDatagramServer
bootstrap, group
latch
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, getServer
public 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 GlowDatagramServer
address
- The address.public void shutdown()
shutdown
in class GlowDatagramServer
public 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 GlowNetworkServer
public void onBindFailure(InetSocketAddress address, Throwable t)
onBindFailure
in class GlowNetworkServer
Copyright © 2021. All rights reserved.