[Jukebox-cvs] CVS update: J4/src/java/gnu/j4/net/telnet Telnet.java
Brought to you by:
vtt
From: CVS B. <vt...@fr...> - 2000-11-02 08:38:28
|
User: vt Date: 00/11/01 23:57:47 Modified: src/java/gnu/j4/net/telnet Telnet.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.7 +9 -4 J4/src/java/gnu/j4/net/telnet/Telnet.java CVSWEB Options: ------------------- CVSWeb: Annotate this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/net/telnet/Telnet.java?annotate=1.7&cvsroot=jukebox4 CVSWeb: View this file: http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/J4/src/java/gnu/j4/net/telnet/Telnet.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/net/telnet/Telnet.java.diff?r1=1.7&r2=1.6&cvsroot=jukebox4 ----------------------------------- Index: Telnet.java =================================================================== RCS file: /usr/local/cvs/J4/src/java/gnu/j4/net/telnet/Telnet.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Telnet.java 2000/05/05 02:51:58 1.6 +++ Telnet.java 2000/11/02 06:57:47 1.7 @@ -37,7 +37,7 @@ * 854</a> for details. * * @author Copyright © <a href="mailto:vt...@fr...">Vadim Tkachenko</a> 1995, 2000 - * @version $Id: Telnet.java,v 1.6 2000/05/05 02:51:58 vt Exp $ + * @version $Id: Telnet.java,v 1.7 2000/11/02 06:57:47 vt Exp $ */ public class Telnet extends SocketService implements TelnetConstants, TelnetOptionConstants { @@ -261,10 +261,15 @@ * Don't kill the sockets, as the parent does, in case when this * service is a dependant. */ - protected void shutdown() throws InterruptedException, Throwable { + protected void shutdown(Throwable failureCause) throws InterruptedException, Throwable { complain(LOG_DEBUG, CH_TELNET, "Shutting down"); + if ( failureCause != null ) { + + complain(LOG_ERR, CH_TELNET, "FIXME: execute() failure cause not processed:", failureCause); + } + if ( reader.isEnabled() ) { complain(LOG_DEBUG, CH_TELNET, "Stopping reader"); reader.stop().waitFor(); @@ -275,7 +280,7 @@ // if ( dependsOn == null && alive ) { - super.shutdown(); + super.shutdown(failureCause); // } } @@ -774,7 +779,7 @@ } } - protected void shutdown() throws InterruptedException { + protected void shutdown(Throwable failureCause) throws InterruptedException { complain(LOG_DEBUG, CH_TR, "Shutting down"); flush(); |