Holger's
Java API

com.antelmann.calendar
Class NTPServer

java.lang.Object
  extended by com.antelmann.calendar.NTPServer
All Implemented Interfaces:
Runnable

Deprecated.

@Deprecated
public class NTPServer
extends Object
implements Runnable

implements the Network Time Protocol (NTP) using tcp/ip.

Author:
Holger Antelmann

Constructor Summary
NTPServer()
          Deprecated.  
NTPServer(int port)
          Deprecated.  
NTPServer(int port, TimeSystem ts)
          Deprecated.  
NTPServer(TimeSystem ts)
          Deprecated.  
 
Method Summary
 Calendar getCalendar()
          Deprecated. returns the calendar used to localize the time
 Logger getLogger()
          Deprecated. returns an empty logger w/o writers by default
 TimeSystem getTimeSystem()
          Deprecated. returns TimeSystem.systemTime by default
 void run()
          Deprecated. accepts connection to its port and sends an integer according to NTP.
protected  int secondsSince1900()
          Deprecated. calculates the raw int used by the NTP protocol
 void setCalendar(Calendar cal)
          Deprecated.  
 void setLogger(Logger logger)
          Deprecated.  
 void setTimeSystem(TimeSystem ts)
          Deprecated. allows to use another time system instead of the system time to provide the correct time.
 void shutdown()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTPServer

public NTPServer()
          throws IOException
Deprecated. 
Throws:
IOException

NTPServer

public NTPServer(TimeSystem ts)
          throws IOException
Deprecated. 
Throws:
IOException

NTPServer

public NTPServer(int port)
          throws IOException
Deprecated. 
Throws:
IOException

NTPServer

public NTPServer(int port,
                 TimeSystem ts)
          throws IOException
Deprecated. 
Throws:
IOException
Method Detail

getTimeSystem

public TimeSystem getTimeSystem()
Deprecated. 
returns TimeSystem.systemTime by default


setTimeSystem

public void setTimeSystem(TimeSystem ts)
Deprecated. 
allows to use another time system instead of the system time to provide the correct time. If the value is set to null, TimeSystem.systemTime is used.


getLogger

public Logger getLogger()
Deprecated. 
returns an empty logger w/o writers by default


setLogger

public void setLogger(Logger logger)
Deprecated. 

getCalendar

public Calendar getCalendar()
Deprecated. 
returns the calendar used to localize the time


setCalendar

public void setCalendar(Calendar cal)
Deprecated. 

secondsSince1900

protected int secondsSince1900()
Deprecated. 
calculates the raw int used by the NTP protocol


shutdown

public void shutdown()
Deprecated. 

run

public void run()
Deprecated. 
accepts connection to its port and sends an integer according to NTP. This method ensures that it can only be run by one thread. Calls by other threads to this method will return immediately while the run method is executing.

Specified by:
run in interface Runnable


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads