net.sourceforge.jsrvany.test
Class SimpleServerImplementationThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--net.sourceforge.jsrvany.test.SimpleServerImplementationThread

public class SimpleServerImplementationThread
extends java.lang.Thread

This class is a single thread started by SimpleServerImplementation

Copyright (c) 1999 Damian Fauth

 


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SimpleServerImplementationThread(java.net.Socket sock)
          Constructor assigning socket
 
Method Summary
 void communicate()
          implement the comms
 void run()
          run this thread
protected  void stopRunning()
          signal thread to stop running
protected  void write(java.lang.String message)
          write to the client
 
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
 

Constructor Detail

SimpleServerImplementationThread

public SimpleServerImplementationThread(java.net.Socket sock)
Constructor assigning socket
Parameters:
sock - is the Socket object
Method Detail

run

public void run()
run this thread
Overrides:
run in class java.lang.Thread

communicate

public void communicate()
                 throws java.io.IOException
implement the comms
Returns:
void
Throws:
java.io.IOException - may be thrown if there are network connectivity problems

write

protected void write(java.lang.String message)
              throws java.io.IOException
write to the client
Parameters:
message - is the message to send as a String
Returns:
void
Throws:
java.io.IOException - may be thrown if there are network connectivity problems

stopRunning

protected void stopRunning()
                    throws java.io.IOException
signal thread to stop running
Returns:
void
Throws:
java.io.IOException - may be thrown if there are network connectivity problems