directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r551805 - in /directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp: messages/ options/
Date Fri, 29 Jun 2007 05:57:05 GMT
Author: erodriguez
Date: Thu Jun 28 22:57:04 2007
New Revision: 551805

URL: http://svn.apache.org/viewvc?view=rev&rev=551805
Log:
Warnings clean-up:  Javadocs.

Modified:
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessage.java
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessageModifier.java
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressListOption.java
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressOption.java
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/DhcpOption.java
    directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessage.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessage.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessage.java
Thu Jun 28 22:57:04 2007
@@ -50,10 +50,30 @@
     private OptionsField options = new OptionsField();
 
 
-    public DhcpMessage(MessageType messageType, byte opCode, byte hardwareAddressType, byte
hardwareAddressLength,
+    /**
+     * Creates a new instance of DhcpMessage.
+     *
+     * @param messageType
+     * @param opCode
+     * @param hardwareAddressType
+     * @param hardwareAddressLength
+     * @param hardwareOptions
+     * @param transactionId
+     * @param seconds
+     * @param flags
+     * @param actualClientAddress
+     * @param assignedClientAddress
+     * @param nextServerAddress
+     * @param relayAgentAddress
+     * @param clientHardwareAddress
+     * @param serverHostname
+     * @param bootFileName
+     * @param options
+     */
+    public DhcpMessage( MessageType messageType, byte opCode, byte hardwareAddressType, byte
hardwareAddressLength,
         byte hardwareOptions, int transactionId, short seconds, short flags, byte[] actualClientAddress,
         byte[] assignedClientAddress, byte[] nextServerAddress, byte[] relayAgentAddress,
byte[] clientHardwareAddress,
-        byte[] serverHostname, byte[] bootFileName, OptionsField options)
+        byte[] serverHostname, byte[] bootFileName, OptionsField options )
     {
         this.messageType = messageType;
         this.opCode = opCode;
@@ -76,6 +96,8 @@
 
     /**
      * Message type.
+     * 
+     * @return The {@link MessageType}.
      */
     public MessageType getMessageType()
     {
@@ -86,6 +108,8 @@
     /**
      * Message op code / message type.
      * 1 = BOOTREQUEST, 2 = BOOTREPLY
+     * 
+     * @return The message op code (type).
      */
     public byte getOpCode()
     {
@@ -96,6 +120,8 @@
     /**
      * Hardware address type, see ARP section in
      * "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet.
+     * 
+     * @return The hardware address type.
      */
     public byte getHardwareAddressType()
     {
@@ -105,6 +131,8 @@
 
     /**
      * Hardware address length (e.g.  '6' for 10mb ethernet).
+     * 
+     * @return The hardware address length.
      */
     public byte getHardwareAddressLength()
     {
@@ -115,6 +143,8 @@
     /**
      * Client sets to zero, optionally used by relay agents
      * when booting via a relay agent.
+     * 
+     * @return The hardware options.
      */
     public byte getHardwareOptions()
     {
@@ -126,6 +156,8 @@
      * Transaction ID, a random number chosen by the client,
      * used by the client and server to associate messages
      * and responses between a client and a server.
+     * 
+     * @return The transaction ID.
      */
     public int getTransactionId()
     {
@@ -136,6 +168,8 @@
     /**
      * Filled in by client, seconds elapsed since client
      * began address acquisition or renewal process.
+     * 
+     * @return The seconds.
      */
     public short getSeconds()
     {
@@ -145,6 +179,8 @@
 
     /**
      * Flags.
+     * 
+     * @return The flags.
      */
     public short getFlags()
     {
@@ -155,6 +191,8 @@
     /**
      * Client IP address; only filled in if client is in BOUND,
      * RENEW or REBINDING state and can respond to ARP requests.
+     * 
+     * @return The actual client addresses.
      */
     public byte[] getActualClientAddress()
     {
@@ -164,6 +202,8 @@
 
     /**
      * Get 'your' (client) IP address.
+     * 
+     * @return The assigned client addresses.
      */
     public byte[] getAssignedClientAddress()
     {
@@ -174,6 +214,8 @@
     /**
      * IP address of next server to use in bootstrap;
      * returned in DHCPOFFER, DHCPACK by server.
+     * 
+     * @return The next server address.
      */
     public byte[] getNextServerAddress()
     {
@@ -183,6 +225,8 @@
 
     /**
      * Relay agent IP address, used in booting via a relay agent.
+     * 
+     * @return The relay agent address.
      */
     public byte[] getRelayAgentAddress()
     {
@@ -192,6 +236,8 @@
 
     /**
      * Client hardware address.
+     * 
+     * @return The client hardware address.
      */
     public byte[] getClientHardwareAddress()
     {
@@ -201,6 +247,8 @@
 
     /**
      * Optional server host name, null terminated string.
+     * 
+     * @return The server hostname.
      */
     public byte[] getServerHostname()
     {
@@ -211,6 +259,8 @@
     /**
      * Boot file name, null terminated string; "generic" name or null
      * in DHCPDISCOVER, fully qualified directory-path name in DHCPOFFER.
+     * 
+     * @return The boot file name.
      */
     public byte[] getBootFileName()
     {
@@ -221,6 +271,8 @@
     /**
      * Optional parameters field.  See the options
      * documents for a list of defined options.
+     * 
+     * @return The options.
      */
     public OptionsField getOptions()
     {

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessageModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessageModifier.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessageModifier.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/messages/DhcpMessageModifier.java
Thu Jun 28 22:57:04 2007
@@ -49,6 +49,11 @@
     private OptionsField options = new OptionsField();
 
 
+    /**
+     * Get a new {@link DhcpMessage}.
+     *
+     * @return The new {@link DhcpMessage}.
+     */
     public DhcpMessage getDhcpMessage()
     {
         return new DhcpMessage( messageType, opCode, hardwareAddressType, hardwareAddressLength,
hardwareOptions,
@@ -59,6 +64,8 @@
 
     /**
      * Message type.
+     * 
+     * @param messageType 
      */
     public void setMessageType( MessageType messageType )
     {
@@ -69,6 +76,8 @@
     /**
      * Message op code / message type.
      * 1 = BOOTREQUEST, 2 = BOOTREPLY
+     * 
+     * @param opCode 
      */
     public void setOpCode( byte opCode )
     {
@@ -79,6 +88,8 @@
     /**
      * Hardware address type, see ARP section in
      * "Assigned Numbers" RFC; e.g., '1' = 10mb ethernet.
+     * 
+     * @param hardwareAddressType 
      */
     public void setHardwareAddressType( byte hardwareAddressType )
     {
@@ -88,6 +99,8 @@
 
     /**
      * Hardware address length (e.g.  '6' for 10mb ethernet).
+     * 
+     * @param hardwareAddressLength 
      */
     public void setHardwareAddressLength( byte hardwareAddressLength )
     {
@@ -110,6 +123,8 @@
      * Transaction ID, a random number chosen by the client,
      * used by the client and server to associate messages
      * and responses between a client and a server.
+     * 
+     * @param transactionId 
      */
     public void setTransactionId( int transactionId )
     {
@@ -120,6 +135,8 @@
     /**
      * Filled in by client, seconds elapsed since client
      * began address acquisition or renewal process.
+     * 
+     * @param seconds 
      */
     public void setSeconds( short seconds )
     {
@@ -129,6 +146,8 @@
 
     /**
      * Flags.
+     * 
+     * @param flags 
      */
     public void setFlags( short flags )
     {
@@ -139,6 +158,8 @@
     /**
      * Client IP address; only filled in if client is in BOUND,
      * RENEW or REBINDING state and can respond to ARP requests.
+     * 
+     * @param actualClientAddress 
      */
     public void setActualClientAddress( byte[] actualClientAddress )
     {
@@ -148,6 +169,8 @@
 
     /**
      * Get 'your' (client) IP address.
+     * 
+     * @param assignedClientAddress 
      */
     public void setAssignedClientAddress( byte[] assignedClientAddress )
     {
@@ -158,6 +181,8 @@
     /**
      * IP address of next server to use in bootstrap;
      * returned in DHCPOFFER, DHCPACK by server.
+     * 
+     * @param nextServerAddress 
      */
     public void setNextServerAddress( byte[] nextServerAddress )
     {
@@ -167,6 +192,8 @@
 
     /**
      * Relay agent IP address, used in booting via a relay agent.
+     * 
+     * @param relayAgentAddress 
      */
     public void setRelayAgentAddress( byte[] relayAgentAddress )
     {
@@ -176,6 +203,8 @@
 
     /**
      * Client hardware address.
+     * 
+     * @param clientHardwareAddress 
      */
     public void setClientHardwareAddress( byte[] clientHardwareAddress )
     {
@@ -185,6 +214,8 @@
 
     /**
      * Optional server host name, null terminated string.
+     * 
+     * @param serverHostname 
      */
     public void setServerHostname( byte[] serverHostname )
     {
@@ -195,6 +226,8 @@
     /**
      * Boot file name, null terminated string; "generic" name or null
      * in DHCPDISCOVER, fully qualified directory-path name in DHCPOFFER.
+     * 
+     * @param bootFileName 
      */
     public void setBootFileName( byte[] bootFileName )
     {
@@ -205,6 +238,8 @@
     /**
      * Optional parameters field.  See the options
      * documents for a list of defined options.
+     * 
+     * @param options 
      */
     public void setOptions( OptionsField options )
     {

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressListOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressListOption.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressListOption.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressListOption.java
Thu Jun 28 22:57:04 2007
@@ -41,7 +41,13 @@
     private byte[] value;
 
 
-    public AddressListOption(int tag, byte[] value)
+    /**
+     * Creates a new instance of AddressListOption.
+     *
+     * @param tag
+     * @param value
+     */
+    public AddressListOption( int tag, byte[] value )
     {
         super( tag, value.length );
         this.value = value;

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressOption.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressOption.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/AddressOption.java
Thu Jun 28 22:57:04 2007
@@ -43,7 +43,13 @@
     private byte[] value;
 
 
-    public AddressOption(int tag, byte[] value)
+    /**
+     * Creates a new instance of AddressOption.
+     *
+     * @param tag
+     * @param value
+     */
+    public AddressOption( int tag, byte[] value )
     {
         super( tag, length );
         this.value = value;

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/DhcpOption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/DhcpOption.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/DhcpOption.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/DhcpOption.java
Thu Jun 28 22:57:04 2007
@@ -40,7 +40,13 @@
     private int length;
 
 
-    public DhcpOption(int tag, int length)
+    /**
+     * Creates a new instance of DhcpOption.
+     *
+     * @param tag
+     * @param length
+     */
+    public DhcpOption( int tag, int length )
     {
         this.tag = tag;
         this.length = length;
@@ -50,6 +56,11 @@
     abstract protected void valueToByteBuffer( ByteBuffer out );
 
 
+    /**
+     * Writes this {@link DhcpOption} to the provided {@link ByteBuffer}.
+     *
+     * @param out
+     */
     public void writeTo( ByteBuffer out )
     {
         out.put( ( byte ) tag );

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java?view=diff&rev=551805&r1=551804&r2=551805
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
(original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/options/OptionsField.java
Thu Jun 28 22:57:04 2007
@@ -40,18 +40,33 @@
     private Set<DhcpOption> options = new HashSet<DhcpOption>();
 
 
+    /**
+     * Adds the provided {@link DhcpOption} to this {@link OptionsField}.
+     *
+     * @param option
+     */
     public void add( DhcpOption option )
     {
         options.add( option );
     }
 
 
+    /**
+     * Returns whether this {@link OptionsField} is empty.
+     *
+     * @return true if this {@link OptionsField} is empty.
+     */
     public boolean isEmpty()
     {
         return options.isEmpty();
     }
 
 
+    /**
+     * Returns this {@link OptionsField} as an array of {@link DhcpOption}s.
+     *
+     * @return The array of {@link DhcpOption}s.
+     */
     public DhcpOption[] toArray()
     {
         return options.toArray( new DhcpOption[options.size()] );



Mime
View raw message