Top Description Fields Constructors Methods
org.apache.sshd.client.channel

public Class ChannelSession

extends AsyncCapableClientChannel
Class Inheritance
Known Direct Subclasses
org.apache.sshd.client.channel.ChannelSubsystem, org.apache.sshd.client.channel.PtyCapableChannelSession
Imports
java.io.IOException, java.util.LinkedHashMap, .Map, .Objects, java.util.concurrent.Future, org.apache.sshd.common.SshConstants, org.apache.sshd.common.channel.RequestHandler, org.apache.sshd.common.session.Session, org.apache.sshd.common.util.GenericUtils, .MapEntryUtils, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.threads.CloseableExecutorService

Client side channel session
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
protected Future<?>
protected CloseableExecutorService
Inherited from org.apache.sshd.client.channel.AsyncCapableClientChannel:
withErrorStream

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected RequestHandler.Result
handleInternalRequest(String
The request type
req
,
boolean
Whether reply is requested
wantReply
,
Buffer
The Buffer containing extra request-specific data
buffer
)

Overrides org.apache.sshd.common.channel.AbstractChannel.handleInternalRequest.

Called by handleUnknownChannelRequest(String, boolean, Buffer) in order to allow channel request handling if none of the registered handlers processed the request - last chance.

protected RequestHandler.Result
handleXonXoff(Buffer buffer, boolean wantReply)

protected void
public Object

Returns:

The replaced/removed previous value - null if no previous value set for the key.
setEnv
(String
The (never null) key (Note: may be empty...)
key
,
Object
The value to set - if null then the pre-existing value for the key (if any) is removed.
value
)

Inherited from org.apache.sshd.client.channel.AsyncCapableClientChannel:
closeImmediately0doOpendoWriteExtendedDatagetAsyncErrgetErrgetInnerCloseablegetInvertedErrpumpInputStreamsecuredReadsetErr

Field Detail

envback to summary
private final Map<String, Object> env
pumperback to summary
protected Future<?> pumper

Hides org.apache.sshd.client.channel.AsyncCapableClientChannel.pumper.

pumperServiceback to summary
protected CloseableExecutorService pumperService

Hides org.apache.sshd.client.channel.AsyncCapableClientChannel.pumperService.

Constructor Detail

ChannelSessionback to summary
public ChannelSession()

Method Detail

handleInternalRequestback to summary
protected RequestHandler.Result handleInternalRequest(String req, boolean wantReply, Buffer buffer) throws IOException

Overrides org.apache.sshd.common.channel.AbstractChannel.handleInternalRequest.

Doc from org.apache.sshd.common.channel.AbstractChannel.handleInternalRequest.

Called by handleUnknownChannelRequest(String, boolean, Buffer) in order to allow channel request handling if none of the registered handlers processed the request - last chance.

Parameters
req:String

The request type

wantReply:boolean

Whether reply is requested

buffer:Buffer

The Buffer containing extra request-specific data

Returns:RequestHandler.Result

The handling result - if null or Unsupported and reply is required then a failure message will be sent

Annotations
@Override
Exceptions
IOException:
If failed to process the request internally
handleXonXoffback to summary
protected RequestHandler.Result handleXonXoff(Buffer buffer, boolean wantReply) throws IOException
sendEnvVariablesback to summary
protected void sendEnvVariables(Session session) throws IOException
setEnvback to summary
public Object setEnv(String key, Object value)
Parameters
key:String

The (never null) key (Note: may be empty...)

value:Object

The value to set - if null then the pre-existing value for the key (if any) is removed.

Returns:Object

The replaced/removed previous value - null if no previous value set for the key.