directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r278615 - in /directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp: NtpException.java NtpService.java service/NtpServiceImpl.java
Date Sun, 04 Sep 2005 17:19:24 GMT
Author: erodriguez
Date: Sun Sep  4 10:19:12 2005
New Revision: 278615

URL: http://svn.apache.org/viewcvs?rev=278615&view=rev
Log:
Formatting:  imports, whitespace, line breaks, or other code convention.

Modified:
    directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpException.java
    directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpService.java
    directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/service/NtpServiceImpl.java

Modified: directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpException.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpException.java?rev=278615&r1=278614&r2=278615&view=diff
==============================================================================
--- directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpException.java (original)
+++ directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpException.java Sun Sep
 4 10:19:12 2005
@@ -17,12 +17,48 @@
 
 package org.apache.ntp;
 
-
+/**
+ * The root of the NTP exception hierarchy.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NtpException extends Exception
 {
-	public NtpException(String name)
-	{
-		super(name);
-	}
-}
+    /**
+     * Creates an NtpException.
+     */
+    public NtpException()
+    {
+        super();
+    }
+
+    /**
+     * Creates an NtpException with a message and cause.
+     * 
+     * @param message the message
+     * @param cause the cause
+     */
+    public NtpException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
 
+    /**
+     * Creates an NtpException with a message.
+     * 
+     * @param message the message
+     */
+    public NtpException( String message )
+    {
+        super( message );
+    }
+
+    /**
+     * @param cause the cause
+     */
+    public NtpException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Modified: directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpService.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpService.java?rev=278615&r1=278614&r2=278615&view=diff
==============================================================================
--- directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpService.java (original)
+++ directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/NtpService.java Sun Sep
 4 10:19:12 2005
@@ -19,12 +19,10 @@
 
 import org.apache.ntp.messages.NtpMessage;
 
-
 /**
  * NTP Protocol (RFC 2030)
  */
 public interface NtpService
 {
-	public NtpMessage getReplyFor(NtpMessage request);
+    public NtpMessage getReplyFor( NtpMessage request );
 }
-

Modified: directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/service/NtpServiceImpl.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/service/NtpServiceImpl.java?rev=278615&r1=278614&r2=278615&view=diff
==============================================================================
--- directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/service/NtpServiceImpl.java
(original)
+++ directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/service/NtpServiceImpl.java
Sun Sep  4 10:19:12 2005
@@ -26,31 +26,29 @@
 import org.apache.ntp.messages.ReferenceIdentifier;
 import org.apache.ntp.messages.StratumType;
 
-
 public class NtpServiceImpl implements NtpService
 {
-	public NtpMessage getReplyFor( NtpMessage request )
-	{
-		NtpMessageModifier modifier = new NtpMessageModifier();
-		
-		modifier.setLeapIndicator( LeapIndicatorType.NO_WARNING );
-		modifier.setVersionNumber( 4 );
-		modifier.setMode( ModeType.SERVER );
-		modifier.setStratum( StratumType.PRIMARY_REFERENCE );
-		modifier.setPollInterval( (byte)0x04 );
-		modifier.setPrecision( (byte)0xFA );
-		modifier.setRootDelay( 0 );
-		modifier.setRootDispersion( 0 );
-		modifier.setReferenceIdentifier( ReferenceIdentifier.LOCL );
-		
-		NtpTimeStamp now = new NtpTimeStamp();
-		
-		modifier.setReferenceTimestamp( now );
-		modifier.setOriginateTimestamp( request.getTransmitTimestamp() );
-		modifier.setReceiveTimestamp( request.getReceiveTimestamp() );
-		modifier.setTransmitTimestamp( now );
-		
-		return modifier.getNtpMessage();
-	}
-}
+    public NtpMessage getReplyFor( NtpMessage request )
+    {
+        NtpMessageModifier modifier = new NtpMessageModifier();
+
+        modifier.setLeapIndicator( LeapIndicatorType.NO_WARNING );
+        modifier.setVersionNumber( 4 );
+        modifier.setMode( ModeType.SERVER );
+        modifier.setStratum( StratumType.PRIMARY_REFERENCE );
+        modifier.setPollInterval( (byte) 0x04 );
+        modifier.setPrecision( (byte) 0xFA );
+        modifier.setRootDelay( 0 );
+        modifier.setRootDispersion( 0 );
+        modifier.setReferenceIdentifier( ReferenceIdentifier.LOCL );
 
+        NtpTimeStamp now = new NtpTimeStamp();
+
+        modifier.setReferenceTimestamp( now );
+        modifier.setOriginateTimestamp( request.getTransmitTimestamp() );
+        modifier.setReceiveTimestamp( request.getReceiveTimestamp() );
+        modifier.setTransmitTimestamp( now );
+
+        return modifier.getNtpMessage();
+    }
+}



Mime
View raw message