cgl.narada.transport.udp
Class UDPPingServer

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.transport.udp.UDPPingServer
All Implemented Interfaces:
Runnable

public class UDPPingServer
extends Thread

Title: UDPPingServer

Description: Listens a ping message and sends an ack for this ping

Version:
1.0

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UDPPingServer()
           
 
Method Summary
 void addPing(UDPLink link, byte[] data)
          adds received ping to a vector to be handled
static void main(String[] args)
           
 void run()
          runs thread in a given interval
 void sendAcks()
          sends an acknowlege to the sender of a ping
 void setDebug(boolean debug)
          sets debug variable for this class
 void shutdownServices()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

UDPPingServer

public UDPPingServer()
Method Detail

shutdownServices

public void shutdownServices()

setDebug

public void setDebug(boolean debug)
sets debug variable for this class

Parameters:
debug -

addPing

public void addPing(UDPLink link,
                    byte[] data)
             throws Exception
adds received ping to a vector to be handled

Parameters:
link - the link for received ping. it is kept to send acknowledge
data - received message with a ping
Throws:
Exception

sendAcks

public void sendAcks()
              throws Exception
sends an acknowlege to the sender of a ping

Throws:
Exception

run

public void run()
runs thread in a given interval

Specified by:
run in interface Runnable
Overrides:
run in class Thread

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project