Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.zazof.jtegServer
Class ClientConnection  view ClientConnection download ClientConnection.java

java.lang.Object
  extended byorg.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


Field Summary
private  ConnectionController $controller
           
private static boolean $debug
           
private  java.io.BufferedReader $in
           
private  java.io.BufferedWriter $out
           
private  Player $player
           
private  java.net.Socket $socket
           
private  java.lang.Thread $thread
           
(package private) static org.apache.log4j.Category log
           
 
Constructor Summary
ClientConnection(java.net.Socket clientSocket, ConnectionController controller)
           
 
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
 

Field Detail

$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
Constructor Detail

ClientConnection

public ClientConnection(java.net.Socket clientSocket,
                        ConnectionController controller)
                 throws java.io.IOException
Method Detail

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