com.xfactorstudio.ahawasi
Class ClientThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.xfactorstudio.ahawasi.ClientThread
All Implemented Interfaces:
java.lang.Runnable

public class ClientThread
extends java.lang.Thread

The thread for a client

Version:
.91
Author:
Neeld Tanksley

Field Summary
 java.io.BufferedReader in
           
 java.io.PrintWriter out
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ClientThread(java.net.Socket socket, java.util.Vector clientList, java.lang.String messageHandler, SocketService parent, Ahawasi server)
           
 
Method Summary
 java.lang.String getClientIP()
          returns the client IP address
 java.util.Hashtable getSessionVariables()
          returns the current session variables
 long getTotalBytesRecieved()
           
 long getTotalBytesSent()
           
 long getUserId()
          returns the userId of this client
 java.lang.String getUserName()
          returns the current username of this client
 void kill()
          kills this client thread
 void run()
          The main method of this thread
 void send(java.lang.String message)
          Sends the specified message the this client
 void setUserName(java.lang.String userName)
          sets the current username of this client
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

out

public java.io.PrintWriter out

in

public java.io.BufferedReader in
Constructor Detail

ClientThread

public ClientThread(java.net.Socket socket,
                    java.util.Vector clientList,
                    java.lang.String messageHandler,
                    SocketService parent,
                    Ahawasi server)
Method Detail

getUserName

public java.lang.String getUserName()
returns the current username of this client

setUserName

public void setUserName(java.lang.String userName)
sets the current username of this client

getUserId

public long getUserId()
returns the userId of this client

getClientIP

public java.lang.String getClientIP()
returns the client IP address

getSessionVariables

public java.util.Hashtable getSessionVariables()
returns the current session variables

kill

public void kill()
kills this client thread

run

public void run()
The main method of this thread
Overrides:
run in class java.lang.Thread

send

public void send(java.lang.String message)
Sends the specified message the this client

getTotalBytesSent

public long getTotalBytesSent()

getTotalBytesRecieved

public long getTotalBytesRecieved()

toXML

public java.lang.String toXML()