comparison src/com/trilead/ssh2/ChannelCondition.java @ 0:0ce5cc452d02

initial version
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 10:41:19 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0ce5cc452d02
1
2 package com.trilead.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@trilead.com
11 * @version $Id: ChannelCondition.java,v 1.1 2007/10/15 12:49:56 cplattne Exp $
12 */
13
14 public abstract interface ChannelCondition {
15 /**
16 * A timeout has occurred, none of your requested conditions is fulfilled.
17 * However, other conditions may be true - therefore, NEVER use the "=="
18 * operator to test for this (or any other) condition. Always use
19 * something like <code>((cond & ChannelCondition.CLOSED) != 0)</code>.
20 */
21 public static final int TIMEOUT = 1;
22
23 /**
24 * The underlying SSH-2 channel, however not necessarily the whole connection,
25 * has been closed. This implies <code>EOF</code>. Note that there may still
26 * be unread stdout or stderr data in the local window, i.e, <code>STDOUT_DATA</code>
27 * or/and <code>STDERR_DATA</code> may be set at the same time.
28 */
29 public static final int CLOSED = 2;
30
31 /**
32 * There is stdout data available that is ready to be consumed.
33 */
34 public static final int STDOUT_DATA = 4;
35
36 /**
37 * There is stderr data available that is ready to be consumed.
38 */
39 public static final int STDERR_DATA = 8;
40
41 /**
42 * EOF on has been reached, no more _new_ stdout or stderr data will arrive
43 * from the remote server. However, there may be unread stdout or stderr
44 * data, i.e, <code>STDOUT_DATA</code> or/and <code>STDERR_DATA</code>
45 * may be set at the same time.
46 */
47 public static final int EOF = 16;
48
49 /**
50 * The exit status of the remote process is available.
51 * Some servers never send the exist status, or occasionally "forget" to do so.
52 */
53 public static final int EXIT_STATUS = 32;
54
55 /**
56 * The exit signal of the remote process is available.
57 */
58 public static final int EXIT_SIGNAL = 64;
59
60 }