|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframs_client_3d.Communication
Communication class.
Field Summary | |
private java.io.BufferedReader |
in
|
private java.util.ArrayList |
log
|
private java.io.PrintWriter |
out
|
private java.net.Socket |
socket
|
Constructor Summary | |
Communication()
|
Method Summary | |
void |
connect(java.lang.String ip,
int port)
Connect to a server. |
void |
disconnect()
Close connection. |
java.util.ArrayList |
getLog()
Log getter. |
java.util.ArrayList |
readMessage()
Read a server response. |
void |
sendMessage(java.lang.String message)
Send request to a server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.net.Socket socket
private java.io.PrintWriter out
private java.io.BufferedReader in
private java.util.ArrayList log
Constructor Detail |
public Communication()
Method Detail |
public void connect(java.lang.String ip, int port) throws java.io.IOException
ip
- port
-
java.io.IOException
- Thrown on I/O error.public void disconnect() throws java.io.IOException
java.io.IOException
- Thrown on socket close error.public java.util.ArrayList readMessage() throws java.io.IOException, java.lang.InterruptedException, CommunicationErrorException
java.io.IOException
- Thrown on read error.
java.lang.InterruptedException
- Thrown on thread sleep interruption.
CommunicationErrorException
- Thrown on protocol error.public void sendMessage(java.lang.String message)
message
- public java.util.ArrayList getLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |