|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javagamesfactory.nioservers.ServerInfo
public class ServerInfo
Contains all the metadata representing a single server instance
Constructor Summary | |
---|---|
ServerInfo(java.lang.String n,
java.net.InetAddress isa,
int p)
Creates a new record representing a server |
Method Summary | |
---|---|
java.net.InetAddress |
getAddress()
Address the server is bound to, without socket |
java.lang.String |
getName()
Human-readable name of this server |
int |
getNumConnectedChannels()
Number of connected clients |
java.net.InetSocketAddress |
getSocketAddress()
Address the server is bound to, including socket |
void |
setNumConnectedChannels(int numConnectedChannels)
Update the number of connected clients (should be called by the server implementation automatically) |
java.lang.String |
toString()
A custom naming convention: "NAME @ ADDRESS:PORT" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServerInfo(java.lang.String n, java.net.InetAddress isa, int p)
n
- name of the serverisa
- address the server is bound top
- port the server is bound toMethod Detail |
---|
public int getNumConnectedChannels()
getNumConnectedChannels
in interface iServerInfo
public void setNumConnectedChannels(int numConnectedChannels)
setNumConnectedChannels
in interface iServerInfo
public java.net.InetAddress getAddress()
getAddress
in interface iServerInfo
public java.net.InetSocketAddress getSocketAddress()
getSocketAddress
in interface iServerInfo
public java.lang.String getName()
getName
in interface iServerInfo
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |