diff --git a/examples/src/HttpServletExamples/package-info.java b/examples/src/HttpServletExamples/package-info.java index fee0bd91907f610b984ab6da73aefc8122ec7b8a..3105b0ca207babfc94fe17bb00a04efacea46507 100644 --- a/examples/src/HttpServletExamples/package-info.java +++ b/examples/src/HttpServletExamples/package-info.java @@ -1,10 +1,10 @@ /** * opendis7 Http Servlet Java examples supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/HttpServletExamples">NetworkedGraphicsMV3500 examples: HttpServletExamples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/HttpServletExamples" target="blank">NetworkedGraphicsMV3500 examples: HttpServletExamples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package HttpServletExamples; diff --git a/examples/src/OpenDis4Examples/EspduReceiver.java b/examples/src/OpenDis4Examples/EspduReceiver.java index 48acbf4185044108258e500a1a83699cd323df25..2a327c29fd6e1860467f1b5a8a2481c068cf95b1 100644 --- a/examples/src/OpenDis4Examples/EspduReceiver.java +++ b/examples/src/OpenDis4Examples/EspduReceiver.java @@ -28,11 +28,11 @@ public class EspduReceiver private static final int MAX_PDU_SIZE = 8192; /** Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ private static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3"; /** Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ private static final int DEFAULT_MULTICAST_PORT = 3000; /** diff --git a/examples/src/OpenDis4Examples/EspduSender.java b/examples/src/OpenDis4Examples/EspduSender.java index 357736be8369857ca0147a6f0c8ac997336bbb49..aad548af9310391a0ad68c3c1f1ed9c2885c624c 100644 --- a/examples/src/OpenDis4Examples/EspduSender.java +++ b/examples/src/OpenDis4Examples/EspduSender.java @@ -28,13 +28,13 @@ public class EspduSender /** Type of network connection */ public enum NetworkMode { /** Unicast network mode - * @see <a href="https://en.wikipedia.org/wiki/Unicast">https://en.wikipedia.org/wiki/Unicast</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Unicast" target="_blank">https://en.wikipedia.org/wiki/Unicast</a> */ UNICAST, /** Multicast network mode - * @see <a href="https://en.wikipedia.org/wiki/Multicast">https://en.wikipedia.org/wiki/Multicast</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast" target="_blank">https://en.wikipedia.org/wiki/Multicast</a> */ MULTICAST, /** Broadcast network mode - * @see <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)">https://en.wikipedia.org/wiki/Broadcasting_(networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)" target="_blank">https://en.wikipedia.org/wiki/Broadcasting_(networking)</a> */ BROADCAST }; @@ -45,7 +45,7 @@ public class EspduSender /** * Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = 3000; diff --git a/examples/src/OpenDis4Examples/PduSender.java b/examples/src/OpenDis4Examples/PduSender.java index c10e980a51688febf2b36555afb2178078b08e9d..0417dd23777a3c33f5888667b9691f3c0e237dc9 100644 --- a/examples/src/OpenDis4Examples/PduSender.java +++ b/examples/src/OpenDis4Examples/PduSender.java @@ -19,11 +19,11 @@ import edu.nps.moves.examples.ClassNameComparator; public class PduSender { /** Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ private static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3"; /** Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ private static final int DEFAULT_MULTICAST_PORT = 3000; private int port; diff --git a/examples/src/OpenDis4Examples/package-info.java b/examples/src/OpenDis4Examples/package-info.java index 0a8ad44c454a1f114a010f533de27c700485fd50..acf568a652b70cfb93425f08706f73d34f79f9d7 100644 --- a/examples/src/OpenDis4Examples/package-info.java +++ b/examples/src/OpenDis4Examples/package-info.java @@ -1,10 +1,10 @@ /** * open-dis library version 4: Java examples supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/OpenDis4Examples">NetworkedGraphicsMV3500 examples: OpenDis4Examples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/OpenDis4Examples" target="blank">NetworkedGraphicsMV3500 examples: OpenDis4Examples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package OpenDis4Examples; diff --git a/examples/src/OpenDis7Examples/AllPduReceiver.java b/examples/src/OpenDis7Examples/AllPduReceiver.java index 4080b377372f87206b9b7ff1da8a75bf9a2ee582..424ab01244d066a36803ca2b3ae0e425b4eb07cf 100644 --- a/examples/src/OpenDis7Examples/AllPduReceiver.java +++ b/examples/src/OpenDis7Examples/AllPduReceiver.java @@ -19,10 +19,10 @@ public class AllPduReceiver // default constructor } /** default multicast address - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String DEFAULT_MULTICAST_ADDRESS = AllPduSender.DEFAULT_MULTICAST_ADDRESS; /** default multicast port - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = AllPduSender.DEFAULT_MULTICAST_PORT; /** TODO whether to use Fast ESPDU */ public static final boolean USE_FAST_ESPDU = false; diff --git a/examples/src/OpenDis7Examples/AllPduSender.java b/examples/src/OpenDis7Examples/AllPduSender.java index 7fb5979225400cf61d5c1e0749490ce0de43da4f..441f9c1006c4c88eb6039de6f44e01a8e09b7594 100755 --- a/examples/src/OpenDis7Examples/AllPduSender.java +++ b/examples/src/OpenDis7Examples/AllPduSender.java @@ -21,11 +21,11 @@ import edu.nps.moves.dis7.enumerations.*; public class AllPduSender { /** Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3"; // PduRecorder "225.4.5.6"; // /** Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = 3000; /** Duration in milliseconds, set to 0 to avoid pausing between PDU sends */ diff --git a/examples/src/OpenDis7Examples/EspduReceiver.java b/examples/src/OpenDis7Examples/EspduReceiver.java index 2c31c8f46f21303bbf29b74e8ff08ca8e66f0364..809f88a1f485432f81c004f387cf6e7c03cf4c0b 100755 --- a/examples/src/OpenDis7Examples/EspduReceiver.java +++ b/examples/src/OpenDis7Examples/EspduReceiver.java @@ -26,11 +26,11 @@ public class EspduReceiver private static final int MAX_PDU_SIZE = 8192; /** Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String DEFAULT_MULTICAST_ADDRESS = EspduSender.DEFAULT_MULTICAST_ADDRESS; /** Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = EspduSender.DEFAULT_MULTICAST_PORT; /** Output prefix to identify this class */ diff --git a/examples/src/OpenDis7Examples/EspduSender.java b/examples/src/OpenDis7Examples/EspduSender.java index cad28676dd917c5b54c777ec3bc60778ce3a5779..6e9b13a4fec6bad2b30ce036a13a03b5a7a2a13b 100644 --- a/examples/src/OpenDis7Examples/EspduSender.java +++ b/examples/src/OpenDis7Examples/EspduSender.java @@ -31,12 +31,12 @@ public class EspduSender /** * Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String DEFAULT_MULTICAST_ADDRESS = "239.1.2.3"; /** * Default multicast port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = 3000; /** Type of network connection: @@ -45,11 +45,11 @@ public class EspduSender * (rarely used, potentially harmful) <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)">BROADCAST</a> */ public enum NetworkMode { - /** Point to point @see <a href="https://en.wikipedia.org/wiki/Unicast">https://en.wikipedia.org/wiki/Unicast</a> */ + /** Point to point @see <a href="https://en.wikipedia.org/wiki/Unicast" target="_blank">https://en.wikipedia.org/wiki/Unicast</a> */ UNICAST, - /** Many to many @see <a href="https://en.wikipedia.org/wiki/Multicast">https://en.wikipedia.org/wiki/Multicast</a> */ + /** Many to many @see <a href="https://en.wikipedia.org/wiki/Multicast" target="_blank">https://en.wikipedia.org/wiki/Multicast</a> */ MULTICAST, - /** (rarely used, potentially harmful) @see <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)">https://en.wikipedia.org/wiki/Broadcasting_(networking)</a> */ + /** (rarely used, potentially harmful) @see <a href="https://en.wikipedia.org/wiki/Broadcasting_(networking)" target="_blank">https://en.wikipedia.org/wiki/Broadcasting_(networking)</a> */ BROADCAST }; diff --git a/examples/src/OpenDis7Examples/ExampleTrackInterpolation.java b/examples/src/OpenDis7Examples/ExampleTrackInterpolation.java index 087b3461b0dcb12e03c386341bca20e61997dd9d..1a481ad2eeb1a837f115a07f54d27998962a9a5b 100644 --- a/examples/src/OpenDis7Examples/ExampleTrackInterpolation.java +++ b/examples/src/OpenDis7Examples/ExampleTrackInterpolation.java @@ -26,7 +26,7 @@ import java.util.logging.Logger; * Default settings include PDU recording turned on by default. * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/src/OpenDis7Examples/ExampleTrackInterpolationLog.txt">ExampleTrackInterpolationLog.txt</a> * @see <a href="https://calhoun.nps.edu/handle/10945/65436">REPEATABLE UNIT TESTING OF DISTRIBUTED INTERACTIVE SIMULATION (DIS) PROTOCOL BEHAVIOR STREAMS USING WEB STANDARDS</a> by Tobias Brennenstuhl, Masters Thesis, Naval Postgraduate School (NPS), June 2020 - * @see <a href="https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias">https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias</a> + * @see <a href="https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias" target="_blank">https://gitlab.nps.edu/Savage/SavageTheses/-/tree/master/BrennenstuhlTobias</a> */ public class ExampleTrackInterpolation extends ExampleSimulationProgram { diff --git a/examples/src/OpenDis7Examples/PduListenerSaver.java b/examples/src/OpenDis7Examples/PduListenerSaver.java index 09231b52b24a73bfb1f70f15ef43c93d56b12877..c70305435c72512a91d9e52f68f569c0969a215e 100644 --- a/examples/src/OpenDis7Examples/PduListenerSaver.java +++ b/examples/src/OpenDis7Examples/PduListenerSaver.java @@ -23,11 +23,11 @@ public class PduListenerSaver private final static String DEFAULT_OUTPUT_DIRECTORY = "pduLog"; /** Default multicast group address <code>229.1.2.3</code> for send and receive connections. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static String DEFAULT_DIS_ADDRESS = DisThreadedNetworkInterface.DEFAULT_DIS_ADDRESS; /** Default socket port <code>3000</code>, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static int DEFAULT_DIS_PORT = DisThreadedNetworkInterface.DEFAULT_DIS_PORT; private enum mystate diff --git a/examples/src/OpenDis7Examples/PduReaderPlayer.java b/examples/src/OpenDis7Examples/PduReaderPlayer.java index 4a81cb52a4c385862562c9e6bcd9f26c25c4ee03..533dd336c1790f2b07203d98e58ab8dfff8be665 100644 --- a/examples/src/OpenDis7Examples/PduReaderPlayer.java +++ b/examples/src/OpenDis7Examples/PduReaderPlayer.java @@ -28,10 +28,10 @@ public class PduReaderPlayer } private final static String DEFAULT_OUTPUT_DIRECTORY = "pduLog"; /** Default multicast group address we send on. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String DEFAULT_MULTICAST_ADDRESS = AllPduSender.DEFAULT_MULTICAST_ADDRESS; /** Default multicast port - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DEFAULT_MULTICAST_PORT = AllPduSender.DEFAULT_MULTICAST_PORT; private enum mystate diff --git a/examples/src/OpenDis7Examples/PduTrack.java b/examples/src/OpenDis7Examples/PduTrack.java index 5773fe5737945939070ac4960cd90a3b47227c65..4c685c3312da635e9003b9778b66ec50d9e488fe 100644 --- a/examples/src/OpenDis7Examples/PduTrack.java +++ b/examples/src/OpenDis7Examples/PduTrack.java @@ -821,7 +821,7 @@ public class PduTrack /** * Convert byte array to hex string * @param bytes input data - * @see <a href="https://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java">https://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java</a> + * @see <a href="https://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java" target="_blank">https://stackoverflow.com/questions/9655181/how-to-convert-a-byte-array-to-a-hex-string-in-java</a> * @return hex string */ public static String bytesToHex(byte[] bytes) diff --git a/examples/src/OpenDis7Examples/package-info.java b/examples/src/OpenDis7Examples/package-info.java index 64a1182881549606fdfdab0699dd3f9d3f84bc1a..b785145d7ea1647b6f909cdba772907b5a53e32a 100644 --- a/examples/src/OpenDis7Examples/package-info.java +++ b/examples/src/OpenDis7Examples/package-info.java @@ -1,10 +1,10 @@ /** * opendis7 Java examples supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/OpenDis7Examples">NetworkedGraphicsMV3500 examples: OpenDis7Examples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/OpenDis7Examples" target="blank">NetworkedGraphicsMV3500 examples: OpenDis7Examples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package OpenDis7Examples; diff --git a/examples/src/SimkitOpenDis7Examples/package-info.java b/examples/src/SimkitOpenDis7Examples/package-info.java index 665c9a5257c9ce35346c837fbea523054104373f..0e224c9a88014fc274223f6a3e94ae20e21f3aac 100644 --- a/examples/src/SimkitOpenDis7Examples/package-info.java +++ b/examples/src/SimkitOpenDis7Examples/package-info.java @@ -1,10 +1,10 @@ /** * Simkit event graphs with opendis7 Java outputs supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/SimkitOpenDis7Examples">NetworkedGraphicsMV3500 examples: SimkitOpenDis7Examples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples/src/SimkitOpenDis7Examples" target="blank">NetworkedGraphicsMV3500 examples: SimkitOpenDis7Examples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package SimkitOpenDis7Examples; diff --git a/examples/src/TcpExamples/TcpExample1Telnet.java b/examples/src/TcpExamples/TcpExample1Telnet.java index 40eb3eadab2ce6311e4fd74865eb8ae2ecda3654..b9ae4a38281d45a6efc54c67852ec64ac36b3abf 100644 --- a/examples/src/TcpExamples/TcpExample1Telnet.java +++ b/examples/src/TcpExamples/TcpExample1Telnet.java @@ -5,10 +5,11 @@ import java.net.*; /** * <p> - * The simplest possible TCP network program. It listens for - * a connection, from telnet (telnet localhost 2317) or a program - * you write, which we will do later. Right now the TcpExample simply - * writes a string in response to a connection. + * The simplest possible TCP network program, opening a socket and waiting for a reply. + * It listens for any socket connection response, either from telnet (telnet localhost 2317) + * or another program that you write (which we will do later). + * Once a socket connection is established, TcpExample1Telnet simply + * writes a string in response to that connection and finishes, exiting. * * <p> * As an alternative to running the Windows (or other operating system) console, @@ -22,7 +23,7 @@ import java.net.*; * Testing the running server program from telnet looks like this: * </p> * <pre> - * it154916:projects mcgredo$ telnet localhost 2317 + * it154916:projects mcgredo$ <b>telnet localhost 2317</b> * Trying ::1... * Connected to localhost. * Escape character is '^]'. @@ -35,14 +36,18 @@ import java.net.*; * </p> * * <p> - * After this first connection the program below drops out - * the bottom of the program, and does not repeat itself. - * The program exits. + * After this first connection the program below drops to + * the bottom of the method, and does not repeat itself. + * In other words, the program exits. * </p> * + * @see <a href="../../../src/TcpExamples/TcpExample1TerminalLog.txt" target="_blank">TcpExample1TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png" target="_blank">TcpExample1NetBeansConsoleTelnet.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf" target="_blank">TcpExample1NetBeansConsoleTelnet.pdf</a> + * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotNetcat.png" target="_blank">TcpExample1ScreenshotNetcat.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample1ScreenshotTelnet.png" target="_blank">TcpExample1ScreenshotTelnet.png</a> * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a> - * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.png">TcpExample1NetBeansConsoleTelnet.png</a> - * @see <a href="../../../src/TcpExamples/TcpExample1NetBeansConsoleTelnet.pdf">TcpExample1NetBeansConsoleTelnet.pdf</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a> * * @author mcgredo * @author brutzman@nps.edu @@ -92,15 +97,15 @@ public class TcpExample1Telnet } System.out.println(TcpExample1Telnet.class.getName() + " completed successfully."); } - catch(IOException e) + catch(IOException ioe) { System.err.println("Exception with " + TcpExample1Telnet.class.getName() + " networking:"); // describe what is happening - System.err.println(e); + System.err.println(ioe); // Provide more helpful information to user if exception occurs due to running twice at one time // brute force exception checking, can be brittle if exception message changes // if (e.getMessage().equals("Address already in use: NET_Bind")) - if (e instanceof java.net.BindException) + if (ioe instanceof java.net.BindException) System.err.println("*** Be sure to stop any other running instances of programs using this port!"); } } diff --git a/examples/src/TcpExamples/TcpExample2ConnectionCounting.java b/examples/src/TcpExamples/TcpExample2ConnectionCounting.java index 0acdd8e44089f02dbd7c540e55b2f1b88e3e19d9..de9a434599c0f5bff320eab63a516922a837af3d 100644 --- a/examples/src/TcpExamples/TcpExample2ConnectionCounting.java +++ b/examples/src/TcpExamples/TcpExample2ConnectionCounting.java @@ -4,20 +4,46 @@ import java.io.*; import java.net.*; /** - * Very slightly more complex than example1. The only thing this does - * differently is introduce a loop into the response, so you don't - * have to restart the program after one response. Also, it prints - * out the socket pair the server sees. Run the program via telnet - * several times and compare the socket pairs. + * <p> + * This program is only slightly more complex than {@link TcpExample1Telnet}, + * counting each connection instead of immediately exiting after the first connection. + * The only thing this program does differently is introduce a loop into the response, + * so you don't have to restart the program after one response. + * Also, it prints out the socket pair the server sees. + * </p> + * <p> + * Suggestion: connect to this program via telnet several times, + * comparing the socket-pair responses each time. + * </p> + * <p> + * <b><code>telnet localhost 2317</code></b> + * </p> + * <p> + * If you're paying attention (and sophisticated!) you can contact the + * another person's computer in class while running this program. This is + * a good way to check local-area network (LAN) connectivity. + * To learn that local computer's IPv4 Address, type + * </p> + * <p> + * <b><code>ipconfig</code></b> + * </p> + * <p> + * (On the NPS campus you might get a ipOfServerLaptop number like 172.20.148.215). + * The someone else (or even that person) can run + * </p> + * <p> + * <b><code>telnet ipOfServerLaptop 2317</code></b> + * </p> + * <p> + * If this program is running, then that machine displays the current counter value of + * socket pairs received. + * </p> + * @see <a href="../../../src/TcpExamples/TcpExample2ConnectionCountingTerminalLog.txt" target="blank">TcpExample2ConnectionCountingTerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample2ConnectionCountingScreenshot.png" target="blank">TcpExample2ConnectionCountingScreenshot.png</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a> + * @see <a href="https://en.wikipedia.org/wiki/Ipconfig" target="blank">Wikipedia: ipconfig</a> * - * <code>telnet localhost 2317</code> - * - * If you're sophisticated you can contact the instructor's computer - * while running this program. - * - * <code>telnet ipOfServersLaptop 2317</code> - * - * And have that machine display the socket pairs received. * @author mcgredo * @author brutzman@nps.edu */ diff --git a/examples/src/TcpExamples/TcpExample3Client.java b/examples/src/TcpExamples/TcpExample3Client.java index 79f5b5f94c4ccd613dc1442f8346f19c1af28c87..7312d3aac7f8aacf27abd5ca77d4c299b0867044 100644 --- a/examples/src/TcpExamples/TcpExample3Client.java +++ b/examples/src/TcpExamples/TcpExample3Client.java @@ -4,13 +4,25 @@ import java.io.*; import java.net.*; /** - * Before, we always used telnet (netcat) to connect to the server. Here we are - * now writing our own program to do the connection. - * - * As you will see, when we run this after we start the server we will see the - * same string telnet printed, sent by the server. The output at the server will - * show different socket pairs for each time the loop iterates. + * <p> + * This program duplicates what happened when telnet (or nc) was invoked in prior examples, + * directly connecting to an already-running {@link TcpExample3Server}. + * In prior examples, we used telnet (or netcat) to connect to the server application. + * In this example, we are now writing our own program to make the socket connection. + * </p> + * <p> + * As you will see, when we run this program after we start the server program, + * we will see a string similar to what telnet printed, sent by the server. + * The output at the server shows different socket-pair values, each time the loop iterates. + * </p> * + * @see TcpExample3Server + * @see <a href="../../../src/TcpExamples/TcpExample3TerminalLog.txt" target="blank">TcpExample3TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample3ServerClientScreenshot.png" target="blank">TcpExample3ServerClientScreenshot.png</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a> + * @see <a href="https://en.wikipedia.org/wiki/Ipconfig" target="blank">Wikipedia: ipconfig</a> + * * @author mcgredo * @author brutzman@nps.edu */ @@ -23,8 +35,8 @@ public class TcpExample3Client } /** IPv6 String constant for localhost address, similarly IPv4 127.0.0.1 - * @see <a href="https://en.wikipedia.org/wiki/localhost">https://en.wikipedia.org/wiki/localhost</a> - * @see <a href="https://en.wikipedia.org/wiki/IPv6_address">https://en.wikipedia.org/wiki/IPv6_address</a> + * @see <a href="https://en.wikipedia.org/wiki/localhost" target="_blank">https://en.wikipedia.org/wiki/localhost</a> + * @see <a href="https://en.wikipedia.org/wiki/IPv6_address" target="_blank">https://en.wikipedia.org/wiki/IPv6_address</a> */ public final static String LOCALHOST = "0:0:0:0:0:0:0:1"; //Local host diff --git a/examples/src/TcpExamples/TcpExample3Server.java b/examples/src/TcpExamples/TcpExample3Server.java index 26b14a7a47de15276c959022740c0e97a2ea4590..016480d7c0c1d33a6614c8817a1269c512a2e77f 100644 --- a/examples/src/TcpExamples/TcpExample3Server.java +++ b/examples/src/TcpExamples/TcpExample3Server.java @@ -4,21 +4,43 @@ import java.io.*; import java.net.*; /** - * Very slightly more complex than example1, further modifying example2. The - * only thing this does differently is introduce a loop into the response, so + * <p> + * This program is only slightly more complex than {@link TcpExample1Telnet} + * and {@link TcpExample2ConnectionCounting}, awaiting a socket response. + * The only thing it does differently is introduce a loop into the response, so * you don't have to restart the program after one response. Also, it prints out - * the socket pair the server sees. Run the program via telnet several times and - * compare the socket pairs. - * - * telnet (nc) localhost 2317 - * - * If you're sophisticated you can contact the instructor's computer while - * running this program. - * - * telnet (nc) [ipNumberOfServerLaptop] 2317 - * - * and have the instructor display the socket pairs received. - * + * the socket pair the server sees. Run the program via telnet (or nc) + * several times and compare the socket pairs. + * </p> + * <p> + * <b><code>telnet localhost 2317</code></b> + * </p> + * <p> + * If you're paying attention (and sophisticated!) you can contact the + * another person's computer in class while running this program. This is + * a good way to check local-area network (LAN) connectivity. + * To learn that local computer's IPv4 Address, type + * </p> + * <p> + * <b><code>ipconfig</code></b> + * </p> + * <p> + * Then contact the other computer by using telnet (or nc) + * </p> + * <p> + * <code><b>telnet</b> [ipNumberOfServerLaptop] <b>2317</b></code> + * </p> + * <p> + * and have the other system display the socket pairs received. + * </p> + * + * @see TcpExample3Client + * @see <a href="../../../src/TcpExamples/TcpExample3TerminalLog.txt" target="blank">TcpExample3TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample3ServerClientScreenshot.png" target="blank">TcpExample3ServerClientScreenshot.png</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#Cygwin" target="blank">Savage Developers Guide: Cygwin</a> + * @see <a href="https://savage.nps.edu/Savage/developers.html#telnet" target="blank">Savage Developers Guide: telnet</a> + * @see <a href="https://en.wikipedia.org/wiki/Ipconfig" target="blank">Wikipedia: ipconfig</a> + * * @author mcgredo * @author brutzman@nps.edu */ diff --git a/examples/src/TcpExamples/TcpExample4Client.java b/examples/src/TcpExamples/TcpExample4Client.java index a1a891b8f76a2010558935e7b226595b684d2b13..9c6999a580ebe4a9bcb4fdbadeed854077df491c 100644 --- a/examples/src/TcpExamples/TcpExample4Client.java +++ b/examples/src/TcpExamples/TcpExample4Client.java @@ -5,9 +5,17 @@ import java.net.*; //import java.time.LocalTime; // conversion? /** - * This client program establishes a socket connection to the dispatch server, - * then checks how long it takes to read the single line it expects. + * This client program establishes a socket connection to the {@link TcpExample4DispatchServer}, + * then checks how long it takes to read the single line it expects as a server response. + * No fancy footwork here, it is pretty simple and similar to {@link TcpExample3Client}. + * + * @see TcpExample4DispatchServer + * @see TcpExample4HandlerThread * + * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a> + * * @author Don McGregor * @author Don Brutzman * @author MV3500 class diff --git a/examples/src/TcpExamples/TcpExample4DispatchServer.java b/examples/src/TcpExamples/TcpExample4DispatchServer.java index 5c0b4ba7256d1920e73cf03b3471d4552feb0a1f..d889c89002b2663d85764ec45a88b4e9495c0388 100644 --- a/examples/src/TcpExamples/TcpExample4DispatchServer.java +++ b/examples/src/TcpExamples/TcpExample4DispatchServer.java @@ -4,8 +4,16 @@ import java.io.IOException; import java.net.*; /** - * A server example that creates and dispatches a new thread to handle multiple - * connections one after another, running in parallel. + * This server program works a bit differently by creating and dispatching a + * new thread to handle multiple incoming socket connections, one after another, all running in parallel. + * This advanced technique is often used in high=performance high=capacity server programs. + * + * @see TcpExample4Client + * @see TcpExample4HandlerThread + * + * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a> * * @author Don McGregor * @author Don Brutzman diff --git a/examples/src/TcpExamples/TcpExample4HandlerThread.java b/examples/src/TcpExamples/TcpExample4HandlerThread.java index 6ff923319b57fdf5603b55545e572e33f46e61c0..2c3a128371e31e9a12b2bcdedb74bbedf5c7a54b 100644 --- a/examples/src/TcpExamples/TcpExample4HandlerThread.java +++ b/examples/src/TcpExamples/TcpExample4HandlerThread.java @@ -4,17 +4,29 @@ import java.io.*; import java.net.*; /** - * A program that handles all logic associated with one socket connection - * by running in a thread of its own. This is the server + * <p> + * This utility class supports the {@link TcpExample4DispatchServer} program, + * handling all programming logic needed for a new socket connection + * to run in a thread of its own. This is the server * portion as well, so we artificially invent what happens * if the server can't respond to a connection for several seconds. - * Warning: do not run this class! It is created automatically by TcpExample4DispatchServer. + * </p> + * <p> + * Warning: do not run this class! It is created and used automatically by {@link TcpExample4DispatchServer} at run time. + * </p> + * + * @see TcpExample4Client + * @see TcpExample4DispatchServer + * + * @see <a href="../../../src/TcpExamples/TcpExample4TerminalLog.txt" target="blank">TcpExample4TerminalLog.txt</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</a> + * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a> * * @author Don McGregor * @author Don Brutzman * @author MV3500 class */ -class TcpExample4HandlerThread extends Thread +public class TcpExample4HandlerThread extends Thread { /** The socket connection to a client */ Socket socket; diff --git a/examples/src/TcpExamples/package-info.java b/examples/src/TcpExamples/package-info.java index 038aa566f0f5afa011e9461055b59a9905d01713..84c534757e0c48c8321bf36bd2d769dac7a141ab 100644 --- a/examples/src/TcpExamples/package-info.java +++ b/examples/src/TcpExamples/package-info.java @@ -1,10 +1,10 @@ /** * TCP Unicast Examples supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples">NetworkedGraphicsMV3500 examples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples" target="blank">NetworkedGraphicsMV3500 examples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package TcpExamples; diff --git a/examples/src/UdpExamples/MulticastUdpSender.java b/examples/src/UdpExamples/MulticastUdpSender.java index c226734aefb6c4c9b7ec475cbb71d1500c6e45a0..68788b7f83da4a6edbf7c8d358669ebd7de0963f 100644 --- a/examples/src/UdpExamples/MulticastUdpSender.java +++ b/examples/src/UdpExamples/MulticastUdpSender.java @@ -25,10 +25,10 @@ public class MulticastUdpSender // https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml /** Default multicast group address for send and receive connections. - * @see <a href="https://en.wikipedia.org/wiki/Multicast_address">https://en.wikipedia.org/wiki/Multicast_address</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Multicast_address" target="_blank">https://en.wikipedia.org/wiki/Multicast_address</a> */ public static final String MULTICAST_ADDRESS = "239.1.2.15"; // within reserved multicast address range /** Default socket port used, matches Wireshark DIS capture default - * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Port_(computer_networking)" target="_blank">https://en.wikipedia.org/wiki/Port_(computer_networking)</a> */ public static final int DESTINATION_PORT = 1718; /** Time to live: how many router-decrement levels can be crossed */ @@ -38,7 +38,7 @@ public class MulticastUdpSender public static final int LOOPSIZE = 20; // or maybe 20000 /** Receiving this message causes termination - * @see <a href="https://en.wikipedia.org/wiki/Sentinel_value">https://en.wikipedia.org/wiki/Sentinel_value</a> */ + * @see <a href="https://en.wikipedia.org/wiki/Sentinel_value" target="_blank">https://en.wikipedia.org/wiki/Sentinel_value</a> */ public static final String QUIT_SENTINEL = "QUIT QUIT QUIT!"; private static NetworkInterface ni; diff --git a/examples/src/UdpExamples/UnicastUdpReceiver.java b/examples/src/UdpExamples/UnicastUdpReceiver.java index 05ee5f93177963eac53385f88ca42e47b1899d05..7bc05fb2b31412a200efdedf9aaacbad60771465 100644 --- a/examples/src/UdpExamples/UnicastUdpReceiver.java +++ b/examples/src/UdpExamples/UnicastUdpReceiver.java @@ -10,9 +10,9 @@ import java.net.*; * * Start this before launching UdpSender. * - * @see <a href="https://docs.oracle.com/javase/tutorial/networking/datagrams/index.html">https://docs.oracle.com/javase/tutorial/networking/datagrams/index.html</a> - * @see <a href="https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html">https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html</a> - * @see <a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol">https://en.wikipedia.org/wiki/User_Datagram_Protocol</a> + * @see <a href="https://docs.oracle.com/javase/tutorial/networking/datagrams/index.html" target="_blank">https://docs.oracle.com/javase/tutorial/networking/datagrams/index.html</a> + * @see <a href="https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html" target="_blank">https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html</a> + * @see <a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol" target="_blank">https://en.wikipedia.org/wiki/User_Datagram_Protocol</a> * @author mcgredo * @author brutzman@nps.edu */ diff --git a/examples/src/UdpExamples/UnicastUdpSender.java b/examples/src/UdpExamples/UnicastUdpSender.java index 937dda0af6dd60405e99534fb2836ef2f2d92532..0722d130f2fc051e26a222af29ed2359c4b18d05 100644 --- a/examples/src/UdpExamples/UnicastUdpSender.java +++ b/examples/src/UdpExamples/UnicastUdpSender.java @@ -11,8 +11,8 @@ import java.net.*; * * Start this before launching UdpReceiver. * - * @see <a href="https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html">https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html</a> - * @see <a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol">https://en.wikipedia.org/wiki/User_Datagram_Protocol</a> + * @see <a href="https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html" target="_blank">https://docs.oracle.com/javase/tutorial/essential/io/datastreams.html</a> + * @see <a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol" target="_blank">https://en.wikipedia.org/wiki/User_Datagram_Protocol</a> * @see <a href="https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html">System properties</a> * @author mcgredo * @author brutzman@nps.edu diff --git a/examples/src/UdpExamples/package-info.java b/examples/src/UdpExamples/package-info.java index b094baef525a4e9ae3fc9b3cbe42451b61973210..ba08cb901d79834a505154495a7e2d0536d03678 100644 --- a/examples/src/UdpExamples/package-info.java +++ b/examples/src/UdpExamples/package-info.java @@ -1,10 +1,10 @@ /** * UDP Multicast Examples supporting the NPS MOVES MV3500 Networked Graphics course. * - * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples">NetworkedGraphicsMV3500 examples</a> + * @see <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/tree/master/examples" target="blank">NetworkedGraphicsMV3500 examples</a> * @see java.lang.Package - * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful">StackOverflow: why-is-package-info-java-useful</a> - * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java">StackOverflow: how-do-i-document-packages-in-java</a> + * @see <a href="https://stackoverflow.com/questions/22095487/why-is-package-info-java-useful" target="blank">StackOverflow: why-is-package-info-java-useful</a> + * @see <a href="https://stackoverflow.com/questions/624422/how-do-i-document-packages-in-java" target="blank">StackOverflow: how-do-i-document-packages-in-java</a> */ package UdpExamples;