Class MyChord.StandardHandler

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--MyChord.StandardHandler
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
MyChord

protected class MyChord.StandardHandler
extends java.lang.Thread

Inner class to handle one interaction for the standard node.


Field Summary
protected  java.lang.String clientIP
           
protected  java.net.Socket clientSock
           
protected  java.io.DataInputStream is
           
protected  java.io.DataOutputStream os
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MyChord.StandardHandler(java.net.Socket sock, java.lang.String clnt)
           
 
Method Summary
 void run()
          Each StandardHandler is a Thread, so we need to redefine the run method to handle a Message.
 
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

clientSock

protected java.net.Socket clientSock

is

protected java.io.DataInputStream is

os

protected java.io.DataOutputStream os

clientIP

protected java.lang.String clientIP
Constructor Detail

MyChord.StandardHandler

public MyChord.StandardHandler(java.net.Socket sock,
                               java.lang.String clnt)
                        throws java.io.IOException
Method Detail

run

public void run()
Each StandardHandler is a Thread, so we need to redefine the run method to handle a Message. Much of this is very similar to the Master Handler.
Overrides:
run in class java.lang.Thread