LP#1646166 Hatch Java docs continued
authorBill Erickson <berickxx@gmail.com>
Thu, 1 Dec 2016 17:22:40 +0000 (12:22 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 16 Feb 2017 20:26:18 +0000 (15:26 -0500)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
src/org/evergreen_ils/hatch/Hatch.java

index 9a8759b..8773fc6 100644 (file)
@@ -34,7 +34,32 @@ import java.util.concurrent.LinkedBlockingQueue;
 /**
  * Main class for Hatch.
  *
- * TODO
+ * Data flow:
+ *
+ * 1. MessageIO::MessageReader thread reads messages on STDIN and queues
+ *    them for later processing by the RequestHandler thread.
+ *
+ * 2. RequestHandler thread collects and unpacks the request for processing.
+ *
+ * 2a. Non-print requests (e.g. file IO) are handled within the 
+ *     RequestHandler thread.
+ *
+ * 2a1. RequestHandler puts responses into the MessageIO::MessageWriter
+ *      outbound message queue.
+ *
+ * 2b. Print requests are added to the Hatch print request queue.
+ * 
+ * 2b1. The PrintRequestShuffler thread passes print requests from the
+ *      print request queue to the FX thread for future processing.
+ *
+ * 2b2. The FX thread renders and prints the HTML
+ *
+ * 2b3. The FX thread puts responses into the MessageIO::MessageWriter
+ *      outbound message queue (via PrintManager) once printing is 
+ *      complete.
+ *
+ * 3. MessageIO::MessageWriter pulls messages from the outbound queue
+ *    and writes them to STDOUT.
  *
  * Beware: On Mac OS, the "FX Application Thread" is renamed to 
  * "AppKit Thread" when the first call to print() or showPrintDialog()