KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > ssh2 > ChannelCondition


1
2 package ch.ethz.ssh2;
3
4 /**
5  * Contains constants that can be used to specify what conditions to wait for on
6  * a SSH-2 channel (e.g., represented by a {@link Session}).
7  *
8  * @see Session#waitForCondition(int, long)
9  *
10  * @author Christian Plattner, plattner@inf.ethz.ch
11  * @version $Id: ChannelCondition.java,v 1.6 2006/08/11 12:24:00 cplattne Exp $
12  */

13
14 public abstract interface ChannelCondition
15 {
16     /**
17      * A timeout has occurred, none of your requested conditions is fulfilled.
18      * However, other conditions may be true - therefore, NEVER use the "=="
19      * operator to test for this (or any other) condition. Always use
20      * something like <code>((cond & ChannelCondition.CLOSED) != 0)</code>.
21      */

22     public static final int TIMEOUT = 1;
23
24     /**
25      * The underlying SSH-2 channel, however not necessarily the whole connection,
26      * has been closed. This implies <code>EOF</code>. Note that there may still
27      * be unread stdout or stderr data in the local window, i.e, <code>STDOUT_DATA</code>
28      * or/and <code>STDERR_DATA</code> may be set at the same time.
29      */

30     public static final int CLOSED = 2;
31
32     /**
33      * There is stdout data available that is ready to be consumed.
34      */

35     public static final int STDOUT_DATA = 4;
36
37     /**
38      * There is stderr data available that is ready to be consumed.
39      */

40     public static final int STDERR_DATA = 8;
41
42     /**
43      * EOF on has been reached, no more _new_ stdout or stderr data will arrive
44      * from the remote server. However, there may be unread stdout or stderr
45      * data, i.e, <code>STDOUT_DATA</code> or/and <code>STDERR_DATA</code>
46      * may be set at the same time.
47      */

48     public static final int EOF = 16;
49
50     /**
51      * The exit status of the remote process is available.
52      * Some servers never send the exist status, or occasionally "forget" to do so.
53      */

54     public static final int EXIT_STATUS = 32;
55
56     /**
57      * The exit signal of the remote process is available.
58      */

59     public static final int EXIT_SIGNAL = 64;
60
61 }
62
Popular Tags