|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Client
Layer handling communication with a client. Incomming messages are turned into a server understandable format and forwarded to the apropriate destination for processing (player's channel or main server thread)
| Method Summary | |
|---|---|
void |
disconnect()
Trigger the disconnection of this client. |
String |
getAgent()
Returns the name of the user agent (GTetrinet, aTwin, Blocktrix...) |
Channel |
getChannel()
Return the channel this client subscribed to. |
Date |
getConnectionTime()
Return the time of the connection to the server. |
String |
getEncoding()
Returns the character encoding to be used for the messages sent to the client. |
long |
getIdleTime()
Return the time in miliseconds of inactivity. |
InetAddress |
getInetAddress()
Return the Internet address of this client. |
Protocol |
getProtocol()
Return the protocol used by this client. |
User |
getUser()
Return the user associated to this client. |
String |
getVersion()
Return the version of the user agent (1.13, 1.14, etc) |
Message |
receive()
Receive a message sent by the client. |
void |
send(Message message)
Send a message to the client. |
void |
setChannel(Channel channel)
Set the channel. |
boolean |
supportsAutoJoin()
Tell if the client can be affected automatically to a channel on connecting to the server. |
boolean |
supportsMultipleChannels()
Tell if the client supports multiple channels simultaneously. |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Method Detail |
|---|
Protocol getProtocol()
Channel getChannel()
void setChannel(Channel channel)
boolean supportsMultipleChannels()
boolean supportsAutoJoin()
User getUser()
String getAgent()
String getVersion()
InetAddress getInetAddress()
Date getConnectionTime()
long getIdleTime()
String getEncoding()
void send(Message message)
send in interface Destinationmessage - the message to send
Message receive()
throws IOException
IOExceptionvoid disconnect()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||