|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jetrix.agent.QueryAgent
public class QueryAgent
Constructor Summary | |
---|---|
QueryAgent()
|
Method Summary | |
---|---|
void |
connect(String hostname)
Connect to the specified server. |
void |
disconnect()
Disconnect from the server. |
List<ChannelInfo> |
getChannels()
|
QueryInfo |
getInfo()
Fetch the information about the server. |
long |
getPing()
Return the ping time to the server in milliseconds. |
int |
getPlayerNumber()
Return the number of players logged in (usualy in the first channel only). |
List<PlayerInfo> |
getPlayers()
|
String |
getVersion()
Return the version of the server. |
void |
receive(Message message)
Receive a message sent by the server. |
void |
send(Message message)
Send a message to the server. |
void |
send(String message)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryAgent()
Method Detail |
---|
public void connect(String hostname) throws IOException
Agent
connect
in interface Agent
hostname
- the name or ip of the server
IOException
public void disconnect() throws IOException
Agent
disconnect
in interface Agent
IOException
public void send(String message) throws IOException
IOException
public void send(Message message) throws IOException
Agent
send
in interface Agent
message
- the message to send
IOException
public void receive(Message message) throws IOException
Agent
receive
in interface Agent
IOException
public QueryInfo getInfo() throws IOException
IOException
public String getVersion() throws IOException
IOException
public int getPlayerNumber() throws IOException
IOException
public List<ChannelInfo> getChannels() throws IOException
IOException
public List<PlayerInfo> getPlayers() throws IOException
IOException
public long getPing() throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |