jclass
Class ServerUDPThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--jclass.SleepingThread
              |
              +--jclass.ServerUDPThread

public class ServerUDPThread
extends SleepingThread

A thread that runs as server on a specified port and accepts incomming datagrams. It then puts the received datagram message, transformed into a SimpleData object into a queue and also sets the .Created variable according to the current time.

Written: Radu Sion
Version: 0.15
Source: ServerUDPThread.java

Visit Smart Software 

See Also:
ServerTCPThread, SimpleQueue, Timer

Fields inherited from class jclass.SleepingThread
DEFAULT_SLEEP
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ServerUDPThread(int port, int maxlen, SimpleQueue dqueue, Timer timebase, long sleep)
          Constructs a new thread object.
 
Method Summary
 void run()
           
 
Methods inherited from class jclass.SleepingThread
getSleep, mysleep, pause, pause, setSleep
 
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 ======== -->

Constructor Detail

ServerUDPThread

public ServerUDPThread(int port,
                       int maxlen,
                       SimpleQueue dqueue,
                       Timer timebase,
                       long sleep)
Constructs a new thread object. If the timebase or the maxlen parameters are null , 0 then ignoring them. If no timebase then timing always with the value -1.
Parameters:
port - Port on which to listen for connections
dqueue - Queue where to put incomming datagrams
maxlen - Maximum length for datagrams (truncate if over)
timebase - Timer to use when timing the received data objects
Method Detail

run

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