Save This Page
Home » j2ssh-0.2.9-src » com.sshtools.common.ui » [javadoc | source]
com.sshtools.common.ui
public interface: SessionManager [javadoc | source]

All Known Implementing Classes:
    SessionProviderFrame, SessionProviderInternalFrame

This interface is used by the Session Provider framework to abstract the SshClient connection away from the session provider. This restricts the session to performing operations that are allowed by the controlling application. For instance, the provider cannot simply diconnect the connection, since the SshClient's disconnect method is not exposed, instead a requestDisconnect method is provided allowing the controlling application to simply ignore a disconnect since it may have other sessions open.

Most of the methods of this interface will simply be required to call the identical method on SshClient.

Method from com.sshtools.common.ui.SessionManager Summary:
addEventHandler,   allowChannelOpen,   applyProfileChanges,   getForwardingClient,   getProfile,   getRemoteEOL,   getServerId,   isConnected,   openChannel,   openSession,   openSftpClient,   requestDisconnect,   sendGlobalRequest
Method from com.sshtools.common.ui.SessionManager Detail:
 public  void addEventHandler(SshEventAdapter eventHandler)
    Add an event handler to the managed connection
 public  void allowChannelOpen(String channelType,
    ChannelFactory cf) throws IOException
    Adds a channel factory to the managed connection.
 public  void applyProfileChanges(SshToolsConnectionProfile profile)
    The session can call this method to apply any changes to the profile it may have made.
 public ForwardingClient getForwardingClient()
    Gets the managed connections port forwarding client.
 public SshToolsConnectionProfile getProfile()
    Get the current profile attached to the session.
 public int getRemoteEOL()
    Returns the guessed EOL setting of the remote computer
 public String getServerId()
    Gets the identification string supplied by the server.
 public boolean isConnected()
    Determine if the managed connection is still connected.
 public boolean openChannel(Channel channel) throws IOException
    Opens a channel on the managed connection.
 public SessionChannelClient openSession() throws IOException
    Opens a session on the managed connection.
 public SftpClient openSftpClient() throws IOException
    Opens an SftpClient on the managed connection.
 public boolean requestDisconnect()
    Called when a session wants to disconnect the connection. The manager implementation should ideally not diconnect unless no other sessions are open.
 public byte[] sendGlobalRequest(String requestname,
    boolean wantreply,
    byte[] requestdata) throws IOException
    Send a global request