cgl.narada.transport.udp
Class UDPPingServer
java.lang.Object
java.lang.Thread
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
|
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 |
UDPPingServer
public UDPPingServer()
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 acknowledgedata - 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