Mercurial > 510Connectbot
annotate src/ch/ethz/ssh2/ChannelCondition.java @ 336:63b23b7c840d ganymed
still hangs during connection
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 31 Jul 2014 14:58:57 -0700 |
parents | 071eccdff8ea |
children |
rev | line source |
---|---|
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
1 /* |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved. |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
3 * Please refer to the LICENSE.txt for licensing details. |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
4 */ |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
5 package ch.ethz.ssh2; |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
6 |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
7 /** |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
8 * Contains constants that can be used to specify what conditions to wait for on |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
9 * a SSH-2 channel (e.g., represented by a {@link Session}). |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
10 * |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
11 * @see Session#waitForCondition(int, long) |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
12 * |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
13 * @author Christian Plattner |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
14 * @version 2.50, 03/15/10 |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
15 */ |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
16 |
307 | 17 public abstract interface ChannelCondition { |
18 /** | |
19 * A timeout has occurred, none of your requested conditions is fulfilled. | |
20 * However, other conditions may be true - therefore, NEVER use the "==" | |
21 * operator to test for this (or any other) condition. Always use | |
22 * something like <code>((cond & ChannelCondition.CLOSED) != 0)</code>. | |
23 */ | |
24 public static final int TIMEOUT = 1; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
25 |
307 | 26 /** |
27 * The underlying SSH-2 channel, however not necessarily the whole connection, | |
28 * has been closed. This implies <code>EOF</code>. Note that there may still | |
29 * be unread stdout or stderr data in the local window, i.e, <code>STDOUT_DATA</code> | |
30 * or/and <code>STDERR_DATA</code> may be set at the same time. | |
31 */ | |
32 public static final int CLOSED = 2; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
33 |
307 | 34 /** |
35 * There is stdout data available that is ready to be consumed. | |
36 */ | |
37 public static final int STDOUT_DATA = 4; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
38 |
307 | 39 /** |
40 * There is stderr data available that is ready to be consumed. | |
41 */ | |
42 public static final int STDERR_DATA = 8; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
43 |
307 | 44 /** |
45 * EOF on has been reached, no more _new_ stdout or stderr data will arrive | |
46 * from the remote server. However, there may be unread stdout or stderr | |
47 * data, i.e, <code>STDOUT_DATA</code> or/and <code>STDERR_DATA</code> | |
48 * may be set at the same time. | |
49 */ | |
50 public static final int EOF = 16; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
51 |
307 | 52 /** |
53 * The exit status of the remote process is available. | |
54 * Some servers never send the exist status, or occasionally "forget" to do so. | |
55 */ | |
56 public static final int EXIT_STATUS = 32; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
57 |
307 | 58 /** |
59 * The exit signal of the remote process is available. | |
60 */ | |
61 public static final int EXIT_SIGNAL = 64; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
62 |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
63 } |