|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
---|---|
void |
addEventHandler(SshEventAdapter eventHandler)
Add an event handler to the managed connection |
void |
allowChannelOpen(java.lang.String channelType,
ChannelFactory cf)
Adds a channel factory to the managed connection. |
void |
applyProfileChanges(SshToolsConnectionProfile profile)
The session can call this method to apply any changes to the profile it may have made. |
ForwardingClient |
getForwardingClient()
Gets the managed connections port forwarding client. |
SshToolsConnectionProfile |
getProfile()
Get the current profile attached to the session. |
int |
getRemoteEOL()
Returns the guessed EOL setting of the remote computer |
java.lang.String |
getServerId()
Gets the identification string supplied by the server. |
boolean |
isConnected()
Determine if the managed connection is still connected. |
boolean |
openChannel(Channel channel)
Opens a channel on the managed connection. |
SessionChannelClient |
openSession()
Opens a session on the managed connection. |
SftpClient |
openSftpClient()
Opens an SftpClient on the managed connection. |
boolean |
requestDisconnect()
Called when a session wants to disconnect the connection. |
byte[] |
sendGlobalRequest(java.lang.String requestname,
boolean wantreply,
byte[] requestdata)
Send a global request |
Method Detail |
---|
SessionChannelClient openSession() throws java.io.IOException
java.io.IOException
void applyProfileChanges(SshToolsConnectionProfile profile)
profile
- SftpClient openSftpClient() throws java.io.IOException
java.io.IOException
boolean openChannel(Channel channel) throws java.io.IOException
channel
-
java.io.IOException
boolean isConnected()
boolean requestDisconnect()
ForwardingClient getForwardingClient()
byte[] sendGlobalRequest(java.lang.String requestname, boolean wantreply, byte[] requestdata) throws java.io.IOException
requestname
- wantreply
- requestdata
-
java.io.IOException
void addEventHandler(SshEventAdapter eventHandler)
eventHandler
- java.lang.String getServerId()
int getRemoteEOL()
void allowChannelOpen(java.lang.String channelType, ChannelFactory cf) throws java.io.IOException
channelType
- cf
-
java.io.IOException
SshToolsConnectionProfile getProfile()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |