cgl.narada.benchmark.nbntp
Class NtpServer

java.lang.Object
  extended by java.lang.Thread
      extended by cgl.narada.benchmark.nbntp.NtpServer
All Implemented Interfaces:
Runnable

public class NtpServer
extends Thread

Runs as server and provides adjusted time value. This class should be used when testing the client discrepancy.


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
NtpServer()
          Generates a new NtpServer object.
NtpServer(int port1)
          Generates a new NtpServer object.
 
Method Summary
static void main(String[] argv)
          MAin class
 void run()
          Run method
 void setBuffer(int start, int end, byte[] tbuffer, byte[] data)
          Sets buffer entries from start to end-1 with the given data array
 
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

NtpServer

public NtpServer()
Generates a new NtpServer object.


NtpServer

public NtpServer(int port1)
Generates a new NtpServer object.

Parameters:
port1 - int - server port number
Method Detail

setBuffer

public void setBuffer(int start,
                      int end,
                      byte[] tbuffer,
                      byte[] data)
Sets buffer entries from start to end-1 with the given data array

Parameters:
start - int - start value
end - int - end value
tbuffer - byte[] - buffer
data - byte[] - data array to be copied

main

public static void main(String[] argv)
                 throws Exception
MAin class

Parameters:
argv - int - port number
Throws:
Exception

run

public void run()
Run method

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


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