com.sshtools.common.ui
Interface SessionManager
- SessionProviderFrame, SessionProviderInternalFrame
public interface SessionManager
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.
addEventHandler
public void addEventHandler(SshEventAdapter eventHandler)
Add an event handler to the managed connection
allowChannelOpen
public void allowChannelOpen(String channelType,
ChannelFactory cf)
throws IOException
Adds a channel factory to the managed connection.
applyProfileChanges
public void applyProfileChanges(SshToolsConnectionProfile profile)
The session can call this method to apply any changes to the profile it
may have made.
getForwardingClient
public ForwardingClient getForwardingClient()
Gets the managed connections port forwarding client.
getRemoteEOL
public int getRemoteEOL()
Returns the guessed EOL setting of the remote computer
getServerId
public String getServerId()
Gets the identification string supplied by the server.
isConnected
public boolean isConnected()
Determine if the managed connection is still connected.
openChannel
public boolean openChannel(Channel channel)
throws IOException
Opens a channel on the managed connection.
openSession
public SessionChannelClient openSession()
throws IOException
Opens a session on the managed connection.
openSftpClient
public SftpClient openSftpClient()
throws IOException
Opens an SftpClient on the managed connection.
requestDisconnect
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.
sendGlobalRequest
public byte[] sendGlobalRequest(String requestname,
boolean wantreply,
byte[] requestdata)
throws IOException
Send a global request
requestname
- wantreply
- requestdata
-
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.