directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r547539 - in /directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp: ./ io/ messages/
Date Fri, 15 Jun 2007 06:08:07 GMT
Author: erodriguez
Date: Thu Jun 14 23:08:06 2007
New Revision: 547539

URL: http://svn.apache.org/viewvc?view=rev&rev=547539
Log:
Javadocs for protocol-ntp.

Modified:
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageEncoder.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessage.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessageModifier.java
    directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpTimeStamp.java

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpServer.java
Thu Jun 14 23:08:06 2007
@@ -48,6 +48,13 @@
     private IoHandler handler;
 
 
+    /**
+     * Creates a new instance of NtpServer.
+     *
+     * @param config
+     * @param acceptor
+     * @param serviceConfig
+     */
     public NtpServer( NtpConfiguration config, IoAcceptor acceptor, IoServiceConfig serviceConfig
)
     {
         this.config = config;
@@ -71,12 +78,21 @@
     }
 
 
+    /**
+     * Returns whether configuration being proposed as new is really different.
+     *
+     * @param newConfig
+     * @return Whether configuration being proposed as new is really different.
+     */
     public boolean isDifferent( Dictionary newConfig )
     {
         return config.isDifferent( newConfig );
     }
 
 
+    /**
+     * Destroys this instance of {@link NtpServer}.
+     */
     public void destroy()
     {
         acceptor.unbind( new InetSocketAddress( config.getIpPort() ) );

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/NtpService.java
Thu Jun 14 23:08:06 2007
@@ -32,5 +32,11 @@
  */
 public interface NtpService
 {
+    /**
+     * Returns an {@link NtpMessage} reply for the given {@link NtpMessage} request.
+     *
+     * @param request
+     * @return The {@link NtpMessage} reply.
+     */
     public NtpMessage getReplyFor( NtpMessage request );
 }

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageDecoder.java
Thu Jun 14 23:08:06 2007
@@ -38,6 +38,12 @@
  */
 public class NtpMessageDecoder
 {
+    /**
+     * Decodes the {@link ByteBuffer} into an {@link NtpMessage}.
+     *
+     * @param request
+     * @return The {@link NtpMessage}.
+     */
     public NtpMessage decode( ByteBuffer request )
     {
         NtpMessageModifier modifier = new NtpMessageModifier();

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageEncoder.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageEncoder.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/io/NtpMessageEncoder.java
Thu Jun 14 23:08:06 2007
@@ -35,6 +35,12 @@
  */
 public class NtpMessageEncoder
 {
+    /**
+     * Encodes the {@link NtpMessage} into the {@link ByteBuffer}.
+     *
+     * @param byteBuffer
+     * @param message
+     */
     public void encode( ByteBuffer byteBuffer, NtpMessage message )
     {
         byte header = 0x00;

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessage.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessage.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessage.java
Thu Jun 14 23:08:06 2007
@@ -44,10 +44,27 @@
     private NtpTimeStamp transmitTimestamp;
 
 
-    public NtpMessage(LeapIndicatorType leapIndicator, int versionNumber, ModeType mode,
StratumType stratumType,
+    /**
+     * Creates a new instance of NtpMessage.
+     *
+     * @param leapIndicator
+     * @param versionNumber
+     * @param mode
+     * @param stratumType
+     * @param pollInterval
+     * @param precision
+     * @param rootDelay
+     * @param rootDispersion
+     * @param referenceIdentifier
+     * @param referenceTimestamp
+     * @param originateTimestamp
+     * @param receiveTimestamp
+     * @param transmitTimestamp
+     */
+    public NtpMessage( LeapIndicatorType leapIndicator, int versionNumber, ModeType mode,
StratumType stratumType,
         byte pollInterval, byte precision, int rootDelay, int rootDispersion, ReferenceIdentifier
referenceIdentifier,
         NtpTimeStamp referenceTimestamp, NtpTimeStamp originateTimestamp, NtpTimeStamp receiveTimestamp,
-        NtpTimeStamp transmitTimestamp)
+        NtpTimeStamp transmitTimestamp )
     {
         this.leapIndicator = leapIndicator;
         this.versionNumber = versionNumber;

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessageModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessageModifier.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessageModifier.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpMessageModifier.java
Thu Jun 14 23:08:06 2007
@@ -44,6 +44,11 @@
     private NtpTimeStamp transmitTimestamp;
 
 
+    /**
+     * Returns the built {@link NtpMessage}.
+     *
+     * @return The {@link NtpMessage}.
+     */
     public NtpMessage getNtpMessage()
     {
         return new NtpMessage( leapIndicator, versionNumber, mode, stratumType, pollInterval,
precision, rootDelay,

Modified: directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpTimeStamp.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpTimeStamp.java?view=diff&rev=547539&r1=547538&r2=547539
==============================================================================
--- directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpTimeStamp.java
(original)
+++ directory/apacheds/trunk/protocol-ntp/src/main/java/org/apache/directory/server/ntp/messages/NtpTimeStamp.java
Thu Jun 14 23:08:06 2007
@@ -56,13 +56,21 @@
     private long fraction = 0;
 
 
+    /**
+     * Creates a new instance of NtpTimeStamp that represents the time "right now."
+     */
     public NtpTimeStamp()
     {
         this( new Date() );
     }
 
 
-    public NtpTimeStamp(Date date)
+    /**
+     * Creates a new instance of NtpTimeStamp that represents the given {@link Date}.
+     *
+     * @param date
+     */
+    public NtpTimeStamp( Date date )
     {
         long msSinceStartOfNtpEpoch = date.getTime() - NTP_EPOCH_DIFFERENCE;
 
@@ -71,7 +79,12 @@
     }
 
 
-    public NtpTimeStamp(ByteBuffer data)
+    /**
+     * Creates a new instance of NtpTimeStamp from encoded data in a {@link ByteBuffer}.
+     *
+     * @param data
+     */
+    public NtpTimeStamp( ByteBuffer data )
     {
         for ( int ii = 0; ii < 4; ii++ )
         {
@@ -85,6 +98,11 @@
     }
 
 
+    /**
+     * Writes this {@link NtpTimeStamp} to the given {@link ByteBuffer}.
+     *
+     * @param buffer
+     */
     public void writeTo( ByteBuffer buffer )
     {
         byte[] bytes = new byte[8];



Mime
View raw message