kaos.core.service.transport.flexfeed
Class FlexfeedCommServer.ClientHandler

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

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


Field Summary
protected  java.lang.String _clientHost
           
protected  Mocket _clientMocket
           
protected  int _clientPort
           
protected  boolean _disconnected
           
protected  java.util.Vector _newObjects
           
protected  java.io.ObjectInputStream _ois
           
 
Constructor Summary
FlexfeedCommServer.ClientHandler(Mocket clientMocket)
          ClientHandler sets the socket
 
Method Summary
 java.util.Vector getNewObjects()
          getNewObjects
 boolean isConnected()
          isConnected
 boolean peerUnreachableWarning(long timeSinceLastContact)
           
 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

_clientMocket

protected Mocket _clientMocket

_ois

protected java.io.ObjectInputStream _ois

_newObjects

protected java.util.Vector _newObjects

_disconnected

protected boolean _disconnected

_clientPort

protected int _clientPort

_clientHost

protected java.lang.String _clientHost
Constructor Detail

FlexfeedCommServer.ClientHandler

public FlexfeedCommServer.ClientHandler(Mocket clientMocket)
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

getNewObjects

public java.util.Vector getNewObjects()
getNewObjects

Returns:
a vector containing the objects that have been read since the last call

isConnected

public boolean isConnected()
isConnected

Returns:
a boolean true = connected false = NOT connected

peerUnreachableWarning

public boolean peerUnreachableWarning(long timeSinceLastContact)