| 
 | Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jscape.inet.ssh.connection.Connection
public abstract class Connection
| Nested Class Summary | |
|---|---|
| static interface | Connection.ConnectionClosedListenerThe connection closer public interface. | 
| Field Summary | |
|---|---|
| static java.lang.String | NAMEThe SSH service name | 
| Method Summary | |
|---|---|
|  void | addChannel(Channel channel)Adds a channel to the channel pool so this channel can receive its messages. | 
|  void | addChannelHandler(java.lang.String requestName,
                  ChannelRequestHandler handler)Adds the channel request handler to the connection service. | 
|  void | addGlobalHandler(java.lang.String requestName,
                 GlobalRequestHandler handler)Adds the global request handler to the connection service. | 
|  void | close() | 
|  boolean | containsChannelHandler(java.lang.String requestName)Checks if the channel request handler is already added. | 
|  boolean | containsGlobalHandler(java.lang.String requestName)Checks if the request handler is already added. | 
|  long | getNextChannelId()Obtains the next available channel #. | 
|  Transport | getTransport()Gets underlying transport for this connection | 
|  com.jscape.inet.ssh.connection.messages.SshMsgRequestSuccess | globalRequest(java.lang.String name,
              boolean wantReply,
              byte[] data) | 
|  boolean | isClosed() | 
|  void | removeChannel(Channel channel)Removes the channel from the pool. | 
|  void | removeChannelHandler(java.lang.String requestName)Removes the channel handler. | 
|  void | removeGlobalHandler(java.lang.String requestName)Removes the global handler. | 
|  com.jscape.inet.ssh.connection.messages.SshMsgChannelOpenConfirmation | requestChannel(com.jscape.inet.ssh.connection.messages.SshMsgChannelOpen request)Requests the connection channel. | 
|  void | sendMessage(Message message)Sends the specified message to peer. | 
|  void | setConnectionClosedListener(Connection.ConnectionClosedListener value)Set connection closer. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String NAME
| Method Detail | 
|---|
public void setConnectionClosedListener(Connection.ConnectionClosedListener value)
value - a listener instancepublic void close()
public void sendMessage(Message message)
                 throws java.io.IOException
message - the message to send
java.io.IOException - if an I/O error occurspublic long getNextChannelId()
public com.jscape.inet.ssh.connection.messages.SshMsgChannelOpenConfirmation requestChannel(com.jscape.inet.ssh.connection.messages.SshMsgChannelOpen request)
                                                                                     throws java.io.IOException
request - the SSH_MSG_CHANNEL_OPEN request
java.io.IOException - if an I/O error occurs
ConnectionException - if the channel cannot be opened
public com.jscape.inet.ssh.connection.messages.SshMsgRequestSuccess globalRequest(java.lang.String name,
                                                                                  boolean wantReply,
                                                                                  byte[] data)
                                                                           throws java.io.IOException
java.io.IOExceptionpublic boolean isClosed()
public void addChannel(Channel channel)
channel - the channel to addpublic void removeChannel(Channel channel)
channel - the channel to remove
public void addGlobalHandler(java.lang.String requestName,
                             GlobalRequestHandler handler)
requestName - the global request namehandler - the request handlerpublic void removeGlobalHandler(java.lang.String requestName)
requestName - the handler's request namepublic boolean containsGlobalHandler(java.lang.String requestName)
requestName - the global request name
true if the appropriate handler is already added;
         false otherwise
public void addChannelHandler(java.lang.String requestName,
                              ChannelRequestHandler handler)
requestName - the global request namehandler - the request handlerpublic void removeChannelHandler(java.lang.String requestName)
requestName - the handler's request namepublic boolean containsChannelHandler(java.lang.String requestName)
requestName - the global request name
true if the appropriate handler is already added;
         false otherwisepublic Transport getTransport()
| 
 | Secure iNet Factory | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||