Modifier and Type | Class and Description |
---|---|
(package private) static class |
QueryResponseHandler.Query |
Modifier and Type | Field and Description |
---|---|
private DataStreamHelper |
data |
private static Logger |
field_23963 |
private DedicatedServer |
field_23964 |
private String |
hostname |
private String |
ip |
private long |
lastQueryTime |
private long |
lastResponseTime |
private String |
levelName |
private int |
maxPlayerCount |
private String |
motd |
private byte[] |
packetBuffer |
private int |
port |
private Map<SocketAddress,QueryResponseHandler.Query> |
queries |
private int |
queryPort |
private DatagramSocket |
socket |
description, running, thread
Modifier | Constructor and Description |
---|---|
private |
QueryResponseHandler(DedicatedServer server,
int queryPort) |
Modifier and Type | Method and Description |
---|---|
private void |
cleanUp() |
static QueryResponseHandler |
create(DedicatedServer server) |
private void |
createQuery(DatagramPacket datagramPacket) |
private byte[] |
createRulesReply(DatagramPacket packet) |
private byte[] |
getMessageBytes(SocketAddress socketAddress) |
private boolean |
handle(DatagramPacket packet) |
private void |
handleIoException(Exception e) |
private boolean |
initialize() |
private Boolean |
isValidQuery(DatagramPacket datagramPacket) |
private void |
reply(byte[] buf,
DatagramPacket datagramPacket) |
void |
run() |
boolean |
start() |
private static final Logger field_23963
private long lastQueryTime
private final int queryPort
private final int port
private final int maxPlayerCount
private final String motd
private final String levelName
private DatagramSocket socket
private final byte[] packetBuffer
private String ip
private String hostname
private final Map<SocketAddress,QueryResponseHandler.Query> queries
private final DataStreamHelper data
private long lastResponseTime
private final DedicatedServer field_23964
private QueryResponseHandler(DedicatedServer server, int queryPort)
@Nullable public static QueryResponseHandler create(DedicatedServer server)
private void reply(byte[] buf, DatagramPacket datagramPacket) throws IOException
IOException
private boolean handle(DatagramPacket packet) throws IOException
IOException
private byte[] createRulesReply(DatagramPacket packet) throws IOException
IOException
private byte[] getMessageBytes(SocketAddress socketAddress)
private Boolean isValidQuery(DatagramPacket datagramPacket)
private void createQuery(DatagramPacket datagramPacket) throws IOException
IOException
private void cleanUp()
public void run()
private void handleIoException(Exception e)
private boolean initialize()