server
Class PulseServer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--server.PulseServer
All Implemented Interfaces:
java.lang.Runnable

public class PulseServer
extends java.lang.Thread

This is the server that listens to incoming connections and will spawn the Pulser thread for each client

Author:
Ben Litchfield

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PulseServer(java.util.Vector f)
          constructor to Server
 
Method Summary
 void addClient(java.io.ObjectOutputStream out)
          this will add a client to send dater to
 int count()
          this will return the client count
 void quit()
          this will quit the PulseServer and all the threads that it has spawned
 void removeClient(java.io.ObjectOutputStream out)
          this will remove a client to send the fish to
 void run()
          this will start the thread running
 void sendFish(Fish newFish)
          This will send fish to all the clients.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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

PulseServer

public PulseServer(java.util.Vector f)
constructor to Server

Parameters:
f - Vector of fish to get FishPOS data from
Method Detail

removeClient

public void removeClient(java.io.ObjectOutputStream out)
this will remove a client to send the fish to

Parameters:
out - the client to remove

sendFish

public void sendFish(Fish newFish)
This will send fish to all the clients.


addClient

public void addClient(java.io.ObjectOutputStream out)
this will add a client to send dater to

Parameters:
out - the client to add to the stream

run

public void run()
this will start the thread running

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

count

public int count()
this will return the client count


quit

public void quit()
this will quit the PulseServer and all the threads that it has spawned