kaos.core.service.transport.tcp
Class TCPCommServer.ClientHandler

java.lang.Object
  extended by kaos.core.service.transport.tcp.TCPCommServer.ClientHandler
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
TCPCommServer

public class TCPCommServer.ClientHandler
extends java.lang.Object
implements java.lang.Runnable


Field Summary
protected  java.lang.String _clientHost
           
protected  int _clientPort
           
protected  java.net.Socket _clientSocket
           
protected  boolean _disconnected
           
protected  java.io.ObjectInputStream _ois
           
 
Constructor Summary
TCPCommServer.ClientHandler(java.net.Socket clientSocket)
          ClientHandler sets the socket
 
Method Summary
 java.lang.String getHost()
          getHost
 int getPort()
          getPort
 boolean isConnected()
          isConnected
 void run()
          run While connected, continues to read the object input stream and adds all objects to the newObjects vector
 void start()
          starts the client handler
 void stop()
          stop sets client handler to disconnected which will terminate the "run" while loop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_clientSocket

protected java.net.Socket _clientSocket

_ois

protected java.io.ObjectInputStream _ois

_disconnected

protected boolean _disconnected

_clientPort

protected int _clientPort

_clientHost

protected java.lang.String _clientHost
Constructor Detail

TCPCommServer.ClientHandler

public TCPCommServer.ClientHandler(java.net.Socket clientSocket)
ClientHandler sets the socket

Parameters:
the - socket for the client handler to read from
Method Detail

start

public void start()
           throws TransportFailure
starts the client handler

Throws:
TransportFailure

stop

public void stop()
stop sets client handler to disconnected which will terminate the "run" while loop


run

public void run()
run While connected, continues to read the object input stream and adds all objects to the newObjects vector

Specified by:
run in interface java.lang.Runnable

isConnected

public boolean isConnected()
isConnected

Returns:
a boolean true = connected false = NOT connected

getHost

public java.lang.String getHost()
getHost

Returns:
host name

getPort

public int getPort()
getPort

Returns:
port number