Skip to content
Snippets Groups Projects
Commit bfa6aef1 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

javadoc corrections

parent 3b6a3faf
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ import java.net.*; ...@@ -5,7 +5,7 @@ import java.net.*;
/** /**
* <p> * <p>
* This program is only slightly more complex than {@link TcpExample1Telnet}, * This program is only slightly more complex than {@link TcpExamples.TcpExample1Telnet},
* counting each connection instead of immediately exiting after the first connection. * 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, * 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. * so you don't have to restart the program after one response.
......
...@@ -6,7 +6,7 @@ import java.net.*; ...@@ -6,7 +6,7 @@ import java.net.*;
/** /**
* <p> * <p>
* This program duplicates what happened when telnet (or nc) was invoked in prior examples, * This program duplicates what happened when telnet (or nc) was invoked in prior examples,
* directly connecting to an already-running {@link TcpExample3Server}. * directly connecting to an already-running {@link TcpExamples.TcpExample3Server}.
* In prior examples, we used telnet (or netcat) to connect to the server application. * 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. * In this example, we are now writing our own program to make the socket connection.
* </p> * </p>
......
...@@ -5,8 +5,8 @@ import java.net.*; ...@@ -5,8 +5,8 @@ import java.net.*;
/** /**
* <p> * <p>
* This program is only slightly more complex than {@link TcpExample1Telnet} * This program is only slightly more complex than {@link TcpExamples.TcpExample1Telnet}
* and {@link TcpExample2ConnectionCounting}, awaiting a socket response. * and {@link TcpExamples.TcpExample2ConnectionCounting}, awaiting a socket response.
* The only thing it does differently is introduce a loop into the response, so * 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 * 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 (or nc) * the socket pair the server sees. Run the program via telnet (or nc)
......
...@@ -5,9 +5,9 @@ import java.net.*; ...@@ -5,9 +5,9 @@ import java.net.*;
//import java.time.LocalTime; // conversion? //import java.time.LocalTime; // conversion?
/** /**
* This client program establishes a socket connection to the {@link TcpExample4DispatchServer}, * This client program establishes a socket connection to the {@link TcpExamples.TcpExample4DispatchServer},
* then checks how long it takes to read the single line it expects as a server response. * 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}. * No fancy footwork here, it is pretty simple and similar to {@link TcpExamples.TcpExample3Client}.
* *
* @see TcpExample4DispatchServer * @see TcpExample4DispatchServer
* @see TcpExample4HandlerThread * @see TcpExample4HandlerThread
......
...@@ -5,14 +5,14 @@ import java.net.*; ...@@ -5,14 +5,14 @@ import java.net.*;
/** /**
* <p> * <p>
* This utility class supports the {@link TcpExample4DispatchServer} program, * This utility class supports the {@link TcpExamples.TcpExample4DispatchServer} program,
* handling all programming logic needed for a new socket connection * handling all programming logic needed for a new socket connection
* to run in a thread of its own. This is the server * to run in a thread of its own. This is the server
* portion as well, so we artificially invent what happens * portion as well, so we artificially invent what happens
* if the server can't respond to a connection for several seconds. * if the server can't respond to a connection for several seconds.
* </p> * </p>
* <p> * <p>
* Warning: do not run this class! It is created and used automatically by {@link TcpExample4DispatchServer} at run time. * Warning: do not run this class! It is created and used automatically by {@link TcpExamples.TcpExample4DispatchServer} at run time.
* </p> * </p>
* *
* @see TcpExample4Client * @see TcpExample4Client
......
...@@ -8,17 +8,17 @@ import java.io.*; ...@@ -8,17 +8,17 @@ import java.io.*;
import java.net.*; import java.net.*;
/** /**
* This client program establishes a socket connection to the {@link TcpSentryScenarioDispatchServer}, * This client program establishes a socket connection to the {@link TcpExamples.TcpSentryDispatchServer},
* then checks how long it takes to read the single line it expects as a server response. * 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}. * No fancy footwork here, it is pretty simple and similar to {@link TcpExamples.TcpExample3Client}.
* *
* @see TcpSentryScenarioDispatchServer * @see TcpSentryDispatchServer
* @see TcpSentryHandlerThread * @see TcpSentryHandlerThread
* @see TcpExample4Client * @see TcpExample4Client
* @see TcpExample4DispatchServer * @see TcpExample4DispatchServer
* @see TcpExample4HandlerThread * @see TcpExample4HandlerThread
* *
* @see <a href="../../../src/TcpExamples/TcpSentryScenarioTerminalLog.txt" target="blank">TcpSentryScenarioTerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpSentryTerminalLog.txt" target="blank">TcpSentryTerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</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> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a>
* *
......
...@@ -8,13 +8,13 @@ import java.net.*; ...@@ -8,13 +8,13 @@ import java.net.*;
* new thread to handle multiple incoming socket connections, one after another, all running in parallel. * 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. * This advanced technique is often used in high=performance high=capacity server programs.
* *
* @see TcpSentryScenarioClient * @see TcpSentryClient
* @see TcpSentryHandlerThread * @see TcpSentryHandlerThread
* @see TcpExample4Client * @see TcpExample4Client
* @see TcpExample4DispatchServer * @see TcpExample4DispatchServer
* @see TcpExample4HandlerThread * @see TcpExample4HandlerThread
* *
* @see <a href="../../../src/TcpExamples/TcpSentryScenarioTerminalLog.txt" target="blank">TcpSentryScenarioTerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpSentryTerminalLog.txt" target="blank">TcpSentryTerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</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> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a>
* *
......
...@@ -7,23 +7,23 @@ import java.util.List; ...@@ -7,23 +7,23 @@ import java.util.List;
/** /**
* <p> * <p>
* This utility class supports the {@link TcpSentryScenarioDispatchServer} program, * This utility class supports the {@link TcpExamples.TcpSentryDispatchServer} program,
* handling all programming logic needed for a new socket connection * handling all programming logic needed for a new socket connection
* to run in a thread of its own. This is the server * to run in a thread of its own. This is the server
* portion as well, so we artificially invent what happens * portion as well, so we artificially invent what happens
* if the server can't respond to a connection for several seconds. * if the server can't respond to a connection for several seconds.
* </p> * </p>
* <p> * <p>
* Warning: do not run this class! It is created and used automatically by {@link TcpSentryScenarioDispatchServer} at run time. * Warning: do not run this class! It is created and used automatically by {@link TcpExamples.TcpSentryDispatchServer} at run time.
* </p> * </p>
* *
* @see TcpSentryScenarioClient * @see TcpSentryClient
* @see TcpSentryScenarioDispatchServer * @see TcpSentryDispatchServer
* @see TcpExample4Client * @see TcpExample4Client
* @see TcpExample4DispatchServer * @see TcpExample4DispatchServer
* @see TcpExample4HandlerThread * @see TcpExample4HandlerThread
* *
* @see <a href="../../../src/TcpExamples/TcpSentryScenarioTerminalLog.txt" target="blank">TcpSentryScenarioTerminalLog.txt</a> * @see <a href="../../../src/TcpExamples/TcpSentryTerminalLog.txt" target="blank">TcpSentryTerminalLog.txt</a>
* @see <a href="../../../src/TcpExamples/TcpExample4SequenceDiagram.png" target="blank">TcpExample4SequenceDiagram.png</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> * @see <a href="../../../src/TcpExamples/TcpExample4SequenceSketch.png" target="blank">TcpExample4SequenceSketch.png</a>
* *
...@@ -34,14 +34,18 @@ import java.util.List; ...@@ -34,14 +34,18 @@ import java.util.List;
public class TcpSentryHandlerThread extends Thread public class TcpSentryHandlerThread extends Thread
{ {
/** Sentry Scenario access list, as written this list is case sensitive. /** Sentry Scenario access list, as written this list is case sensitive.
* See {@linktourl https://stackoverflow.com/questions/1005073/initialization-of-an-arraylist-in-one-line } * See <a href="https://stackoverflow.com/questions/1005073/initialization-of-an-arraylist-in-one-line" target="blank">https://stackoverflow.com/questions/1005073/initialization-of-an-arraylist-in-one-line</a>
*/ */
public static List<String> allowedNamesList = public static List<String> allowedNamesList =
Arrays.asList("Tim", "Stephen", "Mark", "Rene", "Simon", "James", "Ethan", "Jin Hong", "Don"); Arrays.asList("Tim", "Stephen", "Mark", "Rene", "Simon", "James", "Ethan", "Jin Hong", "Don");
/** Sentry command vocabulary */
public static final String SENTRY_WATCH_PRESENT = "Announcement: the sentry watch is present and standing guard."; public static final String SENTRY_WATCH_PRESENT = "Announcement: the sentry watch is present and standing guard.";
/** Sentry command vocabulary */
public static final String HALT_WHO_GOES_THERE = "Halt who goes there?"; public static final String HALT_WHO_GOES_THERE = "Halt who goes there?";
/** Sentry command vocabulary */
public static final String YOU_MAY_PASS = "You may pass, have a great MOVES day!"; public static final String YOU_MAY_PASS = "You may pass, have a great MOVES day!";
/** Sentry command vocabulary */
public static final String HOLD_IT_RIGHT_THERE = "You may not pass! Leave immediately or else..."; public static final String HOLD_IT_RIGHT_THERE = "You may not pass! Leave immediately or else...";
private static final String prefix = "[sentry] "; private static final String prefix = "[sentry] ";
...@@ -66,8 +70,8 @@ public class TcpSentryHandlerThread extends Thread ...@@ -66,8 +70,8 @@ public class TcpSentryHandlerThread extends Thread
*/ */
public static void main(String[] args) public static void main(String[] args)
{ {
System.out.println ("*** TcpSentryScenarioHandlerThread is not a standalone executable progam."); System.out.println ("*** TcpSentryHandlerThread is not a standalone executable progam.");
System.out.println ("*** Please run TcpSentryScenarioDispatchServer instead... now exiting."); System.out.println ("*** Please run TcpSentryDispatchServer instead... now exiting.");
} }
/** Handles one connection. We add an artificial slowness /** Handles one connection. We add an artificial slowness
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment