You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/03 15:39:57 UTC

(commons-net) 03/03: Javadoc

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git

commit ff1c02e942f3c77552d08fa2c63e66d855099311
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 3 11:39:50 2023 -0400

    Javadoc
---
 .../java/org/apache/commons/net/SocketClient.java  |   4 +
 .../org/apache/commons/net/ftp/FTPSCommand.java    |  42 +++++++
 .../org/apache/commons/net/ntp/NtpV3Packet.java    |  56 ++++++++-
 .../apache/commons/net/telnet/TelnetOption.java    | 133 +++++++++++++++++++++
 4 files changed, 232 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/commons/net/SocketClient.java b/src/main/java/org/apache/commons/net/SocketClient.java
index b28d0e12..9bff99f6 100644
--- a/src/main/java/org/apache/commons/net/SocketClient.java
+++ b/src/main/java/org/apache/commons/net/SocketClient.java
@@ -43,6 +43,7 @@ import javax.net.SocketFactory;
  * @see SocketFactory
  */
 public abstract class SocketClient {
+
     /**
      * The end of line character sequence used by most IETF protocols. That is a carriage return followed by a newline: "\r\n"
      */
@@ -89,6 +90,9 @@ public abstract class SocketClient {
     /** The socket's ServerSocket Factory. */
     protected ServerSocketFactory _serverSocketFactory_;
 
+    /**
+     * Defaults to {@link #DEFAULT_CONNECT_TIMEOUT}.
+     */
     protected int connectTimeout = DEFAULT_CONNECT_TIMEOUT;
 
     /** Hint for SO_RCVBUF size */
diff --git a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java
index dc9c3aea..162376a9 100644
--- a/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java
+++ b/src/main/java/org/apache/commons/net/ftp/FTPSCommand.java
@@ -25,18 +25,60 @@ package org.apache.commons.net.ftp;
  */
 @Deprecated
 public final class FTPSCommand {
+
+    /**
+     * {@value}
+     */
     public static final int AUTH = 0;
+
+    /**
+     * {@value}
+     */
     public static final int ADAT = 1;
+
+    /**
+     * {@value}
+     */
     public static final int PBSZ = 2;
+
+    /**
+     * {@value}
+     */
     public static final int PROT = 3;
+
+    /**
+     * {@value}
+     */
     public static final int CCC = 4;
 
+    /**
+     * {@value}
+     */
     public static final int AUTHENTICATION_SECURITY_MECHANISM = AUTH;
+
+    /**
+     * {@value}
+     */
     public static final int AUTHENTICATION_SECURITY_DATA = ADAT;
+
+    /**
+     * {@value}
+     */
     public static final int PROTECTION_BUFFER_SIZE = PBSZ;
+
+    /**
+     * {@value}
+     */
     public static final int DATA_CHANNEL_PROTECTION_LEVEL = PROT;
+
+    /**
+     * {@value}
+     */
     public static final int CLEAR_COMMAND_CHANNEL = CCC;
 
+    /**
+     * {@value}
+     */
     private static final String[] commands = { "AUTH", "ADAT", "PBSZ", "PROT", "CCC" };
 
     /**
diff --git a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
index 6b6ef9d5..7bd3613e 100644
--- a/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
+++ b/src/main/java/org/apache/commons/net/ntp/NtpV3Packet.java
@@ -29,12 +29,26 @@ public interface NtpV3Packet {
      */
     int NTP_PORT = 123;
 
+    /**
+     * {@value}
+     */
     int LI_NO_WARNING = 0;
+
+    /**
+     * {@value}
+     */
     int LI_LAST_MINUTE_HAS_61_SECONDS = 1;
+
+    /**
+     * {@value}
+     */
     int LI_LAST_MINUTE_HAS_59_SECONDS = 2;
+
+    /**
+     * {@value}
+     */
     int LI_ALARM_CONDITION = 3;
 
-    // mode options
     /** Mode option {@value}. */
     int MODE_RESERVED = 0;
 
@@ -59,21 +73,57 @@ public interface NtpV3Packet {
     /** Mode option {@value}. */
     int MODE_PRIVATE = 7;
 
+    /**
+     * {@value}
+     */
     int NTP_MINPOLL = 4; // 16 seconds
+
+    /**
+     * {@value}
+     */
     int NTP_MAXPOLL = 14; // 16284 seconds
 
+    /**
+     * {@value}
+     */
     int NTP_MINCLOCK = 1;
+
+    /**
+     * {@value}
+     */
     int NTP_MAXCLOCK = 10;
 
+    /**
+     * {@value}
+     */
     int VERSION_3 = 3;
+
+    /**
+     * {@value}
+     */
     int VERSION_4 = 4;
 
-    /*
-     * possible getType values such that other time-related protocols can have its information represented as NTP packets
+    //
+    // possible getType values such that other time-related protocols can have its information represented as NTP packets
+    //
+    /**
+     * {@value}
      */
     String TYPE_NTP = "NTP"; // RFC-1305/2030
+
+    /**
+     * {@value}
+     */
     String TYPE_ICMP = "ICMP"; // RFC-792
+
+    /**
+     * {@value}
+     */
     String TYPE_TIME = "TIME"; // RFC-868
+
+    /**
+     * {@value}
+     */
     String TYPE_DAYTIME = "DAYTIME"; // RFC-867
 
     /**
diff --git a/src/main/java/org/apache/commons/net/telnet/TelnetOption.java b/src/main/java/org/apache/commons/net/telnet/TelnetOption.java
index 7bfd6514..396c9048 100644
--- a/src/main/java/org/apache/commons/net/telnet/TelnetOption.java
+++ b/src/main/java/org/apache/commons/net/telnet/TelnetOption.java
@@ -30,92 +30,225 @@ public class TelnetOption {
     /** The maximum value an option code can have. This value is 255. */
     public static final int MAX_OPTION_VALUE = 255;
 
+    /**
+     * {@value}
+     */
     public static final int BINARY = 0;
 
+    /**
+     * {@value}
+     */
     public static final int ECHO = 1;
 
+    /**
+     * {@value}
+     */
     public static final int PREPARE_TO_RECONNECT = 2;
 
+    /**
+     * {@value}
+     */
     public static final int SUPPRESS_GO_AHEAD = 3;
 
+    /**
+     * {@value}
+     */
     public static final int APPROXIMATE_MESSAGE_SIZE = 4;
 
+    /**
+     * {@value}
+     */
     public static final int STATUS = 5;
 
+    /**
+     * {@value}
+     */
     public static final int TIMING_MARK = 6;
 
+    /**
+     * {@value}
+     */
     public static final int REMOTE_CONTROLLED_TRANSMISSION = 7;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_OUTPUT_LINE_WIDTH = 8;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_OUTPUT_PAGE_SIZE = 9;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_CARRIAGE_RETURN = 10;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_HORIZONTAL_TAB_STOP = 11;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_HORIZONTAL_TAB = 12;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_FORMFEED = 13;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_VERTICAL_TAB_STOP = 14;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_VERTICAL_TAB = 15;
 
+    /**
+     * {@value}
+     */
     public static final int NEGOTIATE_LINEFEED = 16;
 
+    /**
+     * {@value}
+     */
     public static final int EXTENDED_ASCII = 17;
 
+    /**
+     * {@value}
+     */
     public static final int FORCE_LOGOUT = 18;
 
+    /**
+     * {@value}
+     */
     public static final int BYTE_MACRO = 19;
 
+    /**
+     * {@value}
+     */
     public static final int DATA_ENTRY_TERMINAL = 20;
 
+    /**
+     * {@value}
+     */
     public static final int SUPDUP = 21;
 
+    /**
+     * {@value}
+     */
     public static final int SUPDUP_OUTPUT = 22;
 
+    /**
+     * {@value}
+     */
     public static final int SEND_LOCATION = 23;
 
+    /**
+     * {@value}
+     */
     public static final int TERMINAL_TYPE = 24;
 
+    /**
+     * {@value}
+     */
     public static final int END_OF_RECORD = 25;
 
+    /**
+     * {@value}
+     */
     public static final int TACACS_USER_IDENTIFICATION = 26;
 
+    /**
+     * {@value}
+     */
     public static final int OUTPUT_MARKING = 27;
 
+    /**
+     * {@value}
+     */
     public static final int TERMINAL_LOCATION_NUMBER = 28;
 
+    /**
+     * {@value}
+     */
     public static final int REGIME_3270 = 29;
 
+    /**
+     * {@value}
+     */
     public static final int X3_PAD = 30;
 
+    /**
+     * {@value}
+     */
     public static final int WINDOW_SIZE = 31;
 
+    /**
+     * {@value}
+     */
     public static final int TERMINAL_SPEED = 32;
 
+    /**
+     * {@value}
+     */
     public static final int REMOTE_FLOW_CONTROL = 33;
 
+    /**
+     * {@value}
+     */
     public static final int LINEMODE = 34;
 
+    /**
+     * {@value}
+     */
     public static final int X_DISPLAY_LOCATION = 35;
 
+    /**
+     * {@value}
+     */
     public static final int OLD_ENVIRONMENT_VARIABLES = 36;
 
+    /**
+     * {@value}
+     */
     public static final int AUTHENTICATION = 37;
 
+    /**
+     * {@value}
+     */
     public static final int ENCRYPTION = 38;
 
+    /**
+     * {@value}
+     */
     public static final int NEW_ENVIRONMENT_VARIABLES = 39;
 
+    /**
+     * {@value}
+     */
     public static final int EXTENDED_OPTIONS_LIST = 255;
 
+    /**
+     * {@value}
+     */
     @SuppressWarnings("unused")
     private static final int FIRST_OPTION = BINARY;
+
+    /**
+     * {@value}
+     */
     private static final int LAST_OPTION = EXTENDED_OPTIONS_LIST;
 
+    /**
+     * {@value}
+     */
     private static final String[] optionString = { "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
             "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", "DATA ENTRY TERMINAL", "SUPDUP",
             "SUPDUP OUTPUT", "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS",