Java Doc for NtpV3Impl.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » ntp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache commons net 1.4.1 » org.apache.commons.net.ntp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.net.ntp.NtpV3Impl

NtpV3Impl
public class NtpV3Impl implements NtpV3Packet(Code)
Implementation of NtpV3Packet with methods converting Java objects to/from the Network Time Protocol (NTP) data message header format described in RFC-1305.
author:
   Naz Irizarry, MITRE Corp
author:
   Jason Mathews, MITRE Corp
version:
   $Revision: 165675 $ $Date: 2005-05-02 15:09:55 -0500 (Mon, 02 May 2005) $



Constructor Summary
public  NtpV3Impl()
    

Method Summary
public  DatagramPacketgetDatagramPacket()
     Returns the datagram packet with the NTP details already filled in.
public  intgetLeapIndicator()
    
public  intgetMode()
     Returns mode as defined in RFC-1305 which is a 3-bit integer whose value is indicated by the MODE_xxx parameters.
public  StringgetModeName()
     Return human-readable name of message mode type as described in RFC 1305.
public  TimeStampgetOriginateTimeStamp()
     Returns the originate time as defined in RFC-1305.
public  intgetPoll()
     Returns poll interval as defined in RFC-1305, which is an eight-bit signed integer indicating the maximum interval between successive messages, in seconds to the nearest power of two (e.g.
public  intgetPrecision()
     Returns precision as defined in RFC-1305 encoded as an 8-bit signed integer (seconds to nearest power of two).
public  TimeStampgetReceiveTimeStamp()
     Returns receive timestamp as defined in RFC-1305.
public  intgetReferenceId()
     Returns the reference id as defined in RFC-1305, which is a 32-bit integer whose value is dependent on several criteria.
public  StringgetReferenceIdString()
     Returns the reference id string.
public  TimeStampgetReferenceTimeStamp()
     Returns the reference time as defined in RFC-1305.
public  intgetRootDelay()
     Return root delay as defined in RFC-1305, which is the total roundtrip delay to the primary reference source, in seconds.
public  doublegetRootDelayInMillisDouble()
     Return root delay as defined in RFC-1305 in milliseconds, which is the total roundtrip delay to the primary reference source, in seconds.
public  intgetRootDispersion()
     Returns root dispersion as defined in RFC-1305.
public  longgetRootDispersionInMillis()
     Returns root dispersion (as defined in RFC-1305) in milliseconds.
public  doublegetRootDispersionInMillisDouble()
     Returns root dispersion (as defined in RFC-1305) in milliseconds as double precision value.
public  intgetStratum()
     Returns Stratum as defined in RFC-1305, which indicates the stratum level of the local clock, with values defined as follows: 0=unspecified, 1=primary ref clock, and all others a secondary reference (via NTP).
public  TimeStampgetTransmitTimeStamp()
     Returns the transmit timestamp as defined in RFC-1305.
public  StringgetType()
     Return type of time packet.
public  intgetVersion()
     Returns NTP version number as defined in RFC-1305.
public  voidsetDatagramPacket(DatagramPacket srcDp)
     Set the contents of this object from source datagram packet.
public  voidsetLeapIndicator(int li)
     Set leap indicator as defined in RFC-1305.
public  voidsetMode(int mode)
     Set mode as defined in RFC-1305.
public  voidsetOriginateTimeStamp(TimeStamp ts)
     Set originate timestamp given NTP TimeStamp object.
public  voidsetPoll(int poll)
     Set poll interval as defined in RFC-1305.
public  voidsetPrecision(int precision)
     Set precision as defined in RFC-1305.
public  voidsetReceiveTimeStamp(TimeStamp ts)
     Set receive timestamp given NTP TimeStamp object.
public  voidsetReferenceId(int refId)
     Set reference clock identifier field with 32-bit unsigned integer value.
public  voidsetReferenceTime(TimeStamp ts)
     Set Reference time with NTP timestamp.
public  voidsetStratum(int stratum)
     Set stratum level as defined in RFC-1305.
public  voidsetTransmitTime(TimeStamp ts)
     Set transmit time with NTP timestamp.
public  voidsetVersion(int version)
     Set NTP version as defined in RFC-1305.
public  StringtoString()
     Returns details of NTP packet as a string.
final protected static  intui(byte b)
     Convert byte to unsigned integer.
final protected static  longul(byte b)
     Convert byte to unsigned long.


Constructor Detail
NtpV3Impl
public NtpV3Impl()(Code)
Creates a new instance of NtpV3Impl




Method Detail
getDatagramPacket
public DatagramPacket getDatagramPacket()(Code)
Returns the datagram packet with the NTP details already filled in. a datagram packet.



getLeapIndicator
public int getLeapIndicator()(Code)
Returns leap indicator as defined in RFC-1305 which is a two-bit code: 0=no warning 1=last minute has 61 seconds 2=last minute has 59 seconds 3=alarm condition (clock not synchronized) leap indicator as defined in RFC-1305.



getMode
public int getMode()(Code)
Returns mode as defined in RFC-1305 which is a 3-bit integer whose value is indicated by the MODE_xxx parameters. mode as defined in RFC-1305.



getModeName
public String getModeName()(Code)
Return human-readable name of message mode type as described in RFC 1305. mode name as string.



getOriginateTimeStamp
public TimeStamp getOriginateTimeStamp()(Code)
Returns the originate time as defined in RFC-1305. the originate time.Never returns null.



getPoll
public int getPoll()(Code)
Returns poll interval as defined in RFC-1305, which is an eight-bit signed integer indicating the maximum interval between successive messages, in seconds to the nearest power of two (e.g. value of six indicates an interval of 64 seconds. The values that can appear in this field range from NTP_MINPOLL to NTP_MAXPOLL inclusive. poll interval as defined in RFC-1305.



getPrecision
public int getPrecision()(Code)
Returns precision as defined in RFC-1305 encoded as an 8-bit signed integer (seconds to nearest power of two). Values normally range from -6 to -20. precision as defined in RFC-1305.



getReceiveTimeStamp
public TimeStamp getReceiveTimeStamp()(Code)
Returns receive timestamp as defined in RFC-1305. the receive time.Never returns null.



getReferenceId
public int getReferenceId()(Code)
Returns the reference id as defined in RFC-1305, which is a 32-bit integer whose value is dependent on several criteria. the reference id as defined in RFC-1305.



getReferenceIdString
public String getReferenceIdString()(Code)
Returns the reference id string. String cannot be null but value is dependent on the version of the NTP spec supported and stratum level. Value can be an empty string, clock type string, IP address, or a hex string. the reference id string.



getReferenceTimeStamp
public TimeStamp getReferenceTimeStamp()(Code)
Returns the reference time as defined in RFC-1305. the reference time as TimeStamp object.Never returns null.



getRootDelay
public int getRootDelay()(Code)
Return root delay as defined in RFC-1305, which is the total roundtrip delay to the primary reference source, in seconds. Values can take positive and negative values, depending on clock precision and skew. root delay as defined in RFC-1305.



getRootDelayInMillisDouble
public double getRootDelayInMillisDouble()(Code)
Return root delay as defined in RFC-1305 in milliseconds, which is the total roundtrip delay to the primary reference source, in seconds. Values can take positive and negative values, depending on clock precision and skew. root delay in milliseconds



getRootDispersion
public int getRootDispersion()(Code)
Returns root dispersion as defined in RFC-1305. root dispersion.



getRootDispersionInMillis
public long getRootDispersionInMillis()(Code)
Returns root dispersion (as defined in RFC-1305) in milliseconds. root dispersion in milliseconds



getRootDispersionInMillisDouble
public double getRootDispersionInMillisDouble()(Code)
Returns root dispersion (as defined in RFC-1305) in milliseconds as double precision value. root dispersion in milliseconds



getStratum
public int getStratum()(Code)
Returns Stratum as defined in RFC-1305, which indicates the stratum level of the local clock, with values defined as follows: 0=unspecified, 1=primary ref clock, and all others a secondary reference (via NTP). Stratum level as defined in RFC-1305.



getTransmitTimeStamp
public TimeStamp getTransmitTimeStamp()(Code)
Returns the transmit timestamp as defined in RFC-1305. the transmit timestamp as defined in RFC-1305.Never returns a null object.



getType
public String getType()(Code)
Return type of time packet. The values (e.g. NTP, TIME, ICMP, ...) correspond to the protocol used to obtain the timing information. packet type string identifier which in this case is "NTP".



getVersion
public int getVersion()(Code)
Returns NTP version number as defined in RFC-1305. NTP version number.



setDatagramPacket
public void setDatagramPacket(DatagramPacket srcDp)(Code)
Set the contents of this object from source datagram packet.
Parameters:
  srcDp - source DatagramPacket to copy contents from.



setLeapIndicator
public void setLeapIndicator(int li)(Code)
Set leap indicator as defined in RFC-1305.
Parameters:
  li - leap indicator.



setMode
public void setMode(int mode)(Code)
Set mode as defined in RFC-1305.
Parameters:
  mode -



setOriginateTimeStamp
public void setOriginateTimeStamp(TimeStamp ts)(Code)
Set originate timestamp given NTP TimeStamp object. If ts is null then zero time is used.
Parameters:
  ts - NTP timestamp



setPoll
public void setPoll(int poll)(Code)
Set poll interval as defined in RFC-1305.
Parameters:
  poll - poll interval.



setPrecision
public void setPrecision(int precision)(Code)
Set precision as defined in RFC-1305.
Parameters:
  precision -



setReceiveTimeStamp
public void setReceiveTimeStamp(TimeStamp ts)(Code)
Set receive timestamp given NTP TimeStamp object. If ts is null then zero time is used.
Parameters:
  ts - timestamp



setReferenceId
public void setReferenceId(int refId)(Code)
Set reference clock identifier field with 32-bit unsigned integer value. See RFC-1305 for description.
Parameters:
  refId - reference clock identifier.



setReferenceTime
public void setReferenceTime(TimeStamp ts)(Code)
Set Reference time with NTP timestamp. If ts is null then zero time is used.
Parameters:
  ts - NTP timestamp



setStratum
public void setStratum(int stratum)(Code)
Set stratum level as defined in RFC-1305.
Parameters:
  stratum - stratum level.



setTransmitTime
public void setTransmitTime(TimeStamp ts)(Code)
Set transmit time with NTP timestamp. If ts is null then zero time is used.
Parameters:
  ts - NTP timestamp



setVersion
public void setVersion(int version)(Code)
Set NTP version as defined in RFC-1305.
Parameters:
  version - NTP version.



toString
public String toString()(Code)
Returns details of NTP packet as a string. details of NTP packet as a string.



ui
final protected static int ui(byte b)(Code)
Convert byte to unsigned integer. Java only has signed types so we have to do more work to get unsigned ops.
Parameters:
  b - unsigned int value of byte



ul
final protected static long ul(byte b)(Code)
Convert byte to unsigned long. Java only has signed types so we have to do more work to get unsigned ops
Parameters:
  b - unsigned long value of byte



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.