geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r721283 - /geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
Date Thu, 27 Nov 2008 21:36:54 GMT
Author: gnodet
Date: Thu Nov 27 13:36:54 2008
New Revision: 721283

URL: http://svn.apache.org/viewvc?rev=721283&view=rev
Log:
Upgrade to latest sshd

Modified:
    geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java

Modified: geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java?rev=721283&r1=721282&r2=721283&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-ssh/src/main/java/org/apache/geronimo/gshell/commands/ssh/ShellFactoryImpl.java
Thu Nov 27 13:36:54 2008
@@ -114,6 +114,8 @@
 
         private OutputStream err;
 
+        private ExitCallback callback;
+
         private IO io;
 
         private Variables variables;
@@ -132,23 +134,16 @@
             this.err = err;
         }
 
+        public void setExitCallback(ExitCallback callback) {
+            this.callback = callback;
+        }
+
         public void start(final Map<String,String> env) throws IOException {
             this.io = new IO(in, out, err, false);
             this.variables = new Variables((Map)env);
             new Thread(this).start();
         }
 
-        public boolean isAlive() {
-            return !closed;
-        }
-
-        public int exitValue() {
-            if (!closed) {
-                throw new IllegalThreadStateException();
-            }
-            return 0;
-        }
-
         public void destroy() {
             close();
         }
@@ -177,6 +172,7 @@
         public void close() {
             closed = true;
             Closer.close(in, out, err);
+            callback.onExit(0);
         }
 
         public boolean isInteractive() {



Mime
View raw message