[Jukebox-cvs] CVS update: J4/src/java/gnu/j4/examples Base64Example.java ChunkedClientTest.java Clie
Brought to you by:
vtt
User: vt Date: 00/11/01 23:57:44 Modified: src/java/gnu/j4/examples Base64Example.java ChunkedClientTest.java ClientTest.java ConfigTest.java ServerTest.java SimpleService.java TelnetTest.java XmlConfigTest.java Log: Checkpoint on the way to implement a shutdown(Throwable failureCause) call, as opposed to no-argument shutdown(). Point is, I want to know why the execute() died, if it did. Revision Changes Path 1.4 +2 -2 J4/src/java/gnu/j4/examples/Base64Example.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/Base64Example.java?annotate=1.4&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/Base64Example.java?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/Base64Example.java.diff?r1=1.4&r2=1.3&cvsroot=jukebox4 ----------------------------------- Index: Base64Example.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/Base64Example.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Base64Example.java 2000/10/25 06:54:52 1.3 +++ Base64Example.java 2000/11/02 06:57:43 1.4 @@ -15,7 +15,7 @@ * MIME Base64 encoding/decoding example. * * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995-1998 - * @version $Id: Base64Example.java,v 1.3 2000/10/25 06:54:52 vt Exp $ + * @version $Id: Base64Example.java,v 1.4 2000/11/02 06:57:43 vt Exp $ */ public class Base64Example extends ActiveService { @@ -75,7 +75,7 @@ * @exception InterruptedException if this thread was interrupted by * another thread. */ - protected void shutdown() throws InterruptedException { complain( + protected void shutdown(Throwable failureCause) throws InterruptedException { complain( LOG_NOTICE,CH_BASE64,"shutdown: cleaning up" ); } 1.5 +2 -2 J4/src/java/gnu/j4/examples/ChunkedClientTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ChunkedClientTest.java?annotate=1.5&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ChunkedClientTest.java?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ChunkedClientTest.java.diff?r1=1.5&r2=1.4&cvsroot=jukebox4 ----------------------------------- Index: ChunkedClientTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/ChunkedClientTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ChunkedClientTest.java 2000/03/03 04:20:16 1.4 +++ ChunkedClientTest.java 2000/11/02 06:57:43 1.5 @@ -13,7 +13,7 @@ /** * This is a test that allows to determine if your servlet engine (or any other URL, for that matter) supports the requests using "<code>Transfer-Encoding: chunked</code>". * - * @version $Id: ChunkedClientTest.java,v 1.4 2000/03/03 04:20:16 vt Exp $ + * @version $Id: ChunkedClientTest.java,v 1.5 2000/11/02 06:57:43 vt Exp $ */ public class ChunkedClientTest extends ActiveService { @@ -71,7 +71,7 @@ } } - protected void shutdown() throws InterruptedException { + protected void shutdown(Throwable failureCause) throws InterruptedException { pool.close(); } 1.7 +2 -2 J4/src/java/gnu/j4/examples/ClientTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ClientTest.java?annotate=1.7&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ClientTest.java?rev=1.7&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ClientTest.java.diff?r1=1.7&r2=1.6&cvsroot=jukebox4 ----------------------------------- Index: ClientTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/ClientTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ClientTest.java 2000/03/03 04:20:16 1.6 +++ ClientTest.java 2000/11/02 06:57:43 1.7 @@ -26,7 +26,7 @@ * * @since Jukebox v2 * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995-1998 - * @version $Id: ClientTest.java,v 1.6 2000/03/03 04:20:16 vt Exp $ + * @version $Id: ClientTest.java,v 1.7 2000/11/02 06:57:43 vt Exp $ */ public class ClientTest extends ActiveService { @@ -89,7 +89,7 @@ * @exception InterruptedException if this thread was interrupted by * another thread. */ - protected void shutdown() throws InterruptedException { + protected void shutdown(Throwable failureCause) throws InterruptedException { ta.stop().waitFor(); } 1.10 +2 -2 J4/src/java/gnu/j4/examples/ConfigTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ConfigTest.java?annotate=1.10&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ConfigTest.java?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ConfigTest.java.diff?r1=1.10&r2=1.9&cvsroot=jukebox4 ----------------------------------- Index: ConfigTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/ConfigTest.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ConfigTest.java 2000/03/03 04:20:16 1.9 +++ ConfigTest.java 2000/11/02 06:57:43 1.10 @@ -42,7 +42,7 @@ * * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1998 - * @version $Id: ConfigTest.java,v 1.9 2000/03/03 04:20:16 vt Exp $ + * @version $Id: ConfigTest.java,v 1.10 2000/11/02 06:57:43 vt Exp $ */ public class ConfigTest extends ActiveService { @@ -79,7 +79,7 @@ * @exception InterruptedException if this thread was interrupted by * another thread. */ - protected void shutdown() throws InterruptedException { + protected void shutdown(Throwable failureCause) throws InterruptedException { } /** 1.8 +2 -2 J4/src/java/gnu/j4/examples/ServerTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ServerTest.java?annotate=1.8&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ServerTest.java?rev=1.8&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/ServerTest.java.diff?r1=1.8&r2=1.7&cvsroot=jukebox4 ----------------------------------- Index: ServerTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/ServerTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ServerTest.java 2000/03/03 04:20:16 1.7 +++ ServerTest.java 2000/11/02 06:57:43 1.8 @@ -17,7 +17,7 @@ * business logic. * * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995-1998 - * @version $Id: ServerTest.java,v 1.7 2000/03/03 04:20:16 vt Exp $ + * @version $Id: ServerTest.java,v 1.8 2000/11/02 06:57:43 vt Exp $ */ public class ServerTest extends Server { /** @@ -85,7 +85,7 @@ * @exception InterruptedException if this thread was interrupted by * another thread. */ - protected void shutdown() throws InterruptedException { + protected void shutdown(Throwable failureCause) throws InterruptedException { } /** 1.5 +10 -4 J4/src/java/gnu/j4/examples/SimpleService.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/SimpleService.java?annotate=1.5&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/SimpleService.java?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/SimpleService.java.diff?r1=1.5&r2=1.4&cvsroot=jukebox4 ----------------------------------- Index: SimpleService.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/SimpleService.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SimpleService.java 2000/06/06 18:46:25 1.4 +++ SimpleService.java 2000/11/02 06:57:43 1.5 @@ -11,9 +11,10 @@ * <li>Log a message on execution, fake successful execution. * </ol> * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995-1998 - * @version $Id: SimpleService.java,v 1.4 2000/06/06 18:46:25 vt Exp $ + * @version $Id: SimpleService.java,v 1.5 2000/11/02 06:57:43 vt Exp $ */ public class SimpleService extends ActiveService { + /** * Log facility to use for this class. */ @@ -29,7 +30,7 @@ * another thread. */ protected void startup() throws InterruptedException { - complain( LOG_NOTICE,LOG_SS,"startup: checking preconditions" ); + complain(LOG_NOTICE, LOG_SS, "startup: checking preconditions"); } /** @@ -42,8 +43,12 @@ * another thread. */ protected void execute() throws InterruptedException { + complain( LOG_NOTICE,LOG_SS,"execute: doing the stuff (sleeping 5 seconds)" ); + Thread.sleep(5000); + + throw new Error("This exception is thrown to illustrate how to clean up abnormal termination"); } /** @@ -55,8 +60,9 @@ * @exception InterruptedException if this thread was interrupted by * another thread. */ - protected void shutdown() throws InterruptedException { - complain( LOG_NOTICE,LOG_SS,"shutdown: cleaning up" ); + protected void shutdown(Throwable failureCause) throws InterruptedException { + + complain(LOG_NOTICE, LOG_SS, "shutdown: cleaning up the exception:", failureCause); } } 1.4 +2 -2 J4/src/java/gnu/j4/examples/TelnetTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/TelnetTest.java?annotate=1.4&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/TelnetTest.java?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/TelnetTest.java.diff?r1=1.4&r2=1.3&cvsroot=jukebox4 ----------------------------------- Index: TelnetTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/TelnetTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TelnetTest.java 2000/04/06 07:30:41 1.3 +++ TelnetTest.java 2000/11/02 06:57:43 1.4 @@ -25,7 +25,7 @@ * By that, it echoes all the input and output in the log. * * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995, 2000 - * @version $Id: TelnetTest.java,v 1.3 2000/04/06 07:30:41 vt Exp $ + * @version $Id: TelnetTest.java,v 1.4 2000/11/02 06:57:43 vt Exp $ */ public class TelnetTest extends ActiveService { @@ -53,7 +53,7 @@ } } - protected void shutdown() throws Throwable { + protected void shutdown(Throwable failureCause) throws Throwable { complain(LOG_INFO, CH_TT, "Shutting down"); } 1.3 +1 -1 J4/src/java/gnu/j4/examples/XmlConfigTest.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/XmlConfigTest.java?annotate=1.3&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/XmlConfigTest.java?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=jukebox4 CVSWeb: Diff to previous version: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/examples/XmlConfigTest.java.diff?r1=1.3&r2=1.2&cvsroot=jukebox4 ----------------------------------- Index: XmlConfigTest.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/examples/XmlConfigTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- XmlConfigTest.java 2000/08/24 20:35:50 1.2 +++ XmlConfigTest.java 2000/11/02 06:57:43 1.3 @@ -71,7 +71,7 @@ protected void execute() { } - protected void shutdown() { + protected void shutdown(Throwable failureCause) { } public String toString(Document source) throws Throwable { |