| com.sshtools.common.ui.SshToolsApplicationInternalFrame com.sshtools.common.ui.SessionProviderInternalFrame
SessionProviderInternalFrame | public class SessionProviderInternalFrame extends SshToolsApplicationInternalFrame implements SessionManager(Code) | | This frame class embeds a SessionProvider and manages the connection
on behalf of the caller. To invoke a session provider from an external
application is a straight forward procedure. Assuming that the connection
has already been established [see SshClient] you can invoke a frame using
the following code:
// Create an SshClient connection
SshClient ssh = new SshClient();
// Connection code goes here - see SshClient for more details
SessionProviderFrame frame = new SessionProviderFrame(null,
new SshToolsConnectionProfile(),
ssh,
SessionProviderFactory.getInstance().getProvider("sshterm"));
frame.pack();
frame.show();
author: Lee David Painter version: $Id: SessionProviderInternalFrame.java,v 1.3 2003/09/24 11:26:32 martianx Exp $ |
Method Summary | |
public void | addEventHandler(SshEventAdapter eventHandler) Implementation of the SessionManager method, simply calls the SshClient
method addEventHandler. | public void | allowChannelOpen(String channelType, ChannelFactory cf) Implemenation of the SessionManager method, simply calls the SshClient
method allowChannelOpen. | public void | applyProfileChanges(SshToolsConnectionProfile profile) Implementation of the SessionManager method, this does nothing. | public boolean | canExit() | public void | exit() Called by the framework when exiting. | public ForwardingClient | getForwardingClient() Implementation of the SessionManager method, simply calls the SshClient
method getForwardingClient. | public SshToolsConnectionProfile | getProfile() Gets the profile currently attached to the frame. | public int | getRemoteEOL() | public String | getServerId() Implemenation of the SessionManager method, simply calls the SshClient
method getServerId. | public SshToolsApplicationSessionPanel | getSessionPanel() Get the attached session provider panel. | public boolean | initFrame(SshToolsApplication app) | public boolean | isConnected() Implementation of the SessionManager method, this simply calls the SshClient
method isConnected. | public boolean | openChannel(Channel channel) Implementation of the SessionManager method, this simply calls the SshClient
method openChannel. | public SessionChannelClient | openSession() Implementation of the SessionManager method, simply calls the SshClient
openSession method. | public SftpClient | openSftpClient() Implementation of the SessionManager method, this simply calls the SshClient
method openSftpClient. | public boolean | requestDisconnect() Implementation of the SessionManager method, this simply returns false. | public byte[] | sendGlobalRequest(String requestname, boolean wantreply, byte[] requestdata) Implementation of the SessionManager method, simply calls the SshClient
method sendGlobalRequest. | public void | setDisconnectOnClose(boolean disconnectOnClose) |
addEventHandler | public void addEventHandler(SshEventAdapter eventHandler)(Code) | | Implementation of the SessionManager method, simply calls the SshClient
method addEventHandler.
Parameters: eventHandler - |
allowChannelOpen | public void allowChannelOpen(String channelType, ChannelFactory cf) throws IOException(Code) | | Implemenation of the SessionManager method, simply calls the SshClient
method allowChannelOpen.
Parameters: channelType - Parameters: cf - throws: IOException - |
applyProfileChanges | public void applyProfileChanges(SshToolsConnectionProfile profile)(Code) | | Implementation of the SessionManager method, this does nothing. Overide this
method to provide additional functionality to save changes made by the session
to the profile.
Parameters: profile - |
canExit | public boolean canExit()(Code) | | Called by the application framework when testing exit state
|
exit | public void exit()(Code) | | Called by the framework when exiting. Can also be called to close the session.
|
getForwardingClient | public ForwardingClient getForwardingClient()(Code) | | Implementation of the SessionManager method, simply calls the SshClient
method getForwardingClient.
|
getRemoteEOL | public int getRemoteEOL()(Code) | | Returns the guessed EOL setting of the remote computer
|
getServerId | public String getServerId()(Code) | | Implemenation of the SessionManager method, simply calls the SshClient
method getServerId.
|
isConnected | public boolean isConnected()(Code) | | Implementation of the SessionManager method, this simply calls the SshClient
method isConnected.
|
openChannel | public boolean openChannel(Channel channel) throws IOException(Code) | | Implementation of the SessionManager method, this simply calls the SshClient
method openChannel.
Parameters: channel - throws: IOException - |
openSftpClient | public SftpClient openSftpClient() throws IOException(Code) | | Implementation of the SessionManager method, this simply calls the SshClient
method openSftpClient.
throws: IOException - |
requestDisconnect | public boolean requestDisconnect()(Code) | | Implementation of the SessionManager method, this simply returns false.
Overide to change this behaviour
|
sendGlobalRequest | public byte[] sendGlobalRequest(String requestname, boolean wantreply, byte[] requestdata) throws IOException(Code) | | Implementation of the SessionManager method, simply calls the SshClient
method sendGlobalRequest.
Parameters: requestname - Parameters: wantreply - Parameters: requestdata - throws: IOException - |
setDisconnectOnClose | public void setDisconnectOnClose(boolean disconnectOnClose)(Code) | | When the session closes, should the connection be disconnected?
Parameters: disconnectOnClose - |
|
|