|
30 | 30 | import com.trilead.ssh2.transport.MessageHandler; |
31 | 31 |
|
32 | 32 | /** |
33 | | - * ChannelManager. Please read the comments in Channel.java. |
| 33 | + * ChannelManager coordinates all SSH channels over a single transport connection. |
34 | 34 | * <p> |
35 | | - * Besides the crypto part, this is the core of the library. |
| 35 | + * This class is the core of the SSH channel layer, managing: |
| 36 | + * <ul> |
| 37 | + * <li>Channel lifecycle (open, close, EOF)</li> |
| 38 | + * <li>Data transmission and flow control</li> |
| 39 | + * <li>Channel requests (PTY, X11, exec, shell, subsystem)</li> |
| 40 | + * <li>Global requests (port forwarding, ping)</li> |
| 41 | + * <li>SSH message routing to appropriate channel handlers</li> |
| 42 | + * </ul> |
| 43 | + * <p> |
| 44 | + * Architecture: ChannelManager implements {@link MessageHandler} to receive |
| 45 | + * SSH packets in the range 80-100 (channel-related messages) from the |
| 46 | + * {@link com.trilead.ssh2.transport.TransportManager}. It maintains a registry |
| 47 | + * of active channels and routes messages to the appropriate channel instance. |
| 48 | + * <p> |
| 49 | + * The manager handles both synchronous operations (like opening a session channel) |
| 50 | + * and asynchronous message processing (incoming data, window adjustments, channel close). |
| 51 | + * <p> |
| 52 | + * Thread safety: All channel operations are synchronized on the channels list or |
| 53 | + * individual channel objects to ensure proper concurrency control. |
36 | 54 | * |
37 | 55 | * @author Christian Plattner, plattner@trilead.com |
38 | 56 | * @version $Id: ChannelManager.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $ |
| 57 | + * @see Channel |
| 58 | + * @see MessageHandler |
| 59 | + * @see com.trilead.ssh2.transport.ITransportConnection |
39 | 60 | */ |
40 | 61 | public class ChannelManager implements MessageHandler |
41 | 62 | { |
|
0 commit comments