java.lang.Object
org.zazof.jtegServer.ClientConnection
- All Implemented Interfaces:
- java.lang.Runnable
- public class ClientConnection
- extends java.lang.Object
- implements java.lang.Runnable
This class is a socket connection to a client teg/jteg application
|
Method Summary |
java.lang.String |
read()
reads a message from the client
blocking call |
void |
run()
This method will be called by whoever wishes to run your class
implementing Runnable. |
void |
write(java.lang.String message)
sends a message to the client |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$out
private java.io.BufferedWriter $out
$in
private java.io.BufferedReader $in
$socket
private java.net.Socket $socket
$thread
private java.lang.Thread $thread
$controller
private ConnectionController $controller
$debug
private static final boolean $debug
- See Also:
- Constant Field Values
$player
private Player $player
log
static org.apache.log4j.Category log
ClientConnection
public ClientConnection(java.net.Socket clientSocket,
ConnectionController controller)
throws java.io.IOException
run
public void run()
- Description copied from interface:
java.lang.Runnable
- This method will be called by whoever wishes to run your class
implementing Runnable. Note that there are no restrictions on what
you are allowed to do in the run method, except that you cannot
throw a checked exception.
- Specified by:
run in interface java.lang.Runnable
read
public java.lang.String read()
throws java.io.IOException
- reads a message from the client
blocking call
write
public void write(java.lang.String message)
- sends a message to the client