public class SessionChannel extends Channel<SshClientContext>
Channel.QueuedData
Modifier and Type | Field and Description |
---|---|
static int |
EXITCODE_NOT_RECEIVED |
connection, localwindow, localWindowLock
Constructor and Description |
---|
SessionChannel(int maximumPacketSize,
int initialWindowSize) |
Modifier and Type | Method and Description |
---|---|
RequestFuture |
allocatePseudoTerminal() |
protected byte[] |
createChannel()
Called when the channel is being created.
|
protected void |
evaluateWindowSpace(int remaining)
Called to evaluate the window space available.
|
RequestFuture |
executeCommand(String cmd) |
RequestFuture |
executeCommand(String cmd,
String charset) |
RequestFuture |
getCloseFuture() |
int |
getExitCode() |
String |
getExitSignalInfo() |
int |
getMaximumLocalPacketLength() |
int |
getMaximumRemotePacketLength() |
boolean |
isFlowControlEnabled() |
protected void |
onChannelClosed()
Called when the channel has been closed to enable resources to be freed.
|
protected void |
onChannelClosing()
Called before the channel is closed
|
protected void |
onChannelData(byte[] msg)
Called by the channel when data arrives from the remote side.
|
protected void |
onChannelFree()
This method is called when the channel has been closed and all its
resources are no longer required.
|
protected void |
onChannelOpen()
Called when the channel has been opened - this method is only called when
the remote side requests a channel open.
|
protected void |
onChannelOpenConfirmation()
Called when the channel has been confirmed as open by the remote side -
this method is only called when the channel has been requested by this
side of the connection
|
protected void |
onChannelRequest(String requesttype,
boolean wantreply,
byte[] requestdata)
Called when a channel request is received.
|
protected void |
onExtendedData(byte[] data,
int type)
Called by the channel when extended data arrives
|
protected void |
onLocalEOF()
Called when the local side is EOF.
|
protected void |
onRemoteEOF()
Called when the remote side reports its OutputStream as EOF.
|
protected byte[] |
openChannel(byte[] requestdata)
Called when the channel is being opened.
|
RequestFuture |
startShell() |
RequestFuture |
startSubsystem(String subsystem) |
addEventListener, addInputListener, addOutputListener, canClose, clearIdleState, close, getChannelType, getConnection, getConnectionProtocol, getContext, getLocalId, getLocalPacket, getLocalWindow, getQueueSize, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, isClosed, isClosing, isEOF, isLocalEOF, isOpen, isRemoteEOF, onChannelOpenFailure, onRemoteClose, onWindowAdjust, processChannelRequestResponse, queueSize, registerExtendedData, resetIdleState, sendChannelData, sendChannelData, sendChannelData, sendChannelData, sendChannelDataAndBlock, sendChannelRequest, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust
public static final int EXITCODE_NOT_RECEIVED
public SessionChannel(int maximumPacketSize, int initialWindowSize)
protected void onChannelData(byte[] msg)
Channel
onChannelData
in class Channel<SshClientContext>
protected void onExtendedData(byte[] data, int type)
Channel
onExtendedData
in class Channel<SshClientContext>
protected void onChannelFree()
Channel
onChannelFree
in class Channel<SshClientContext>
protected byte[] createChannel() throws IOException
Channel
createChannel
in class Channel<SshClientContext>
IOException
protected byte[] openChannel(byte[] requestdata) throws WriteOperationRequest, ChannelOpenException
Channel
openChannel
in class Channel<SshClientContext>
WriteOperationRequest
ChannelOpenException
protected void onChannelOpenConfirmation()
Channel
onChannelOpenConfirmation
in class Channel<SshClientContext>
public RequestFuture getCloseFuture()
protected void onChannelClosed()
Channel
onChannelClosed
in class Channel<SshClientContext>
protected void onChannelOpen()
Channel
onChannelOpen
in class Channel<SshClientContext>
public RequestFuture allocatePseudoTerminal()
public RequestFuture startShell()
public RequestFuture executeCommand(String cmd) throws SshException
SshException
public RequestFuture executeCommand(String cmd, String charset)
public RequestFuture startSubsystem(String subsystem)
protected void onChannelClosing()
Channel
onChannelClosing
in class Channel<SshClientContext>
protected void onChannelRequest(String requesttype, boolean wantreply, byte[] requestdata)
Channel
onChannelRequest
in class Channel<SshClientContext>
public int getExitCode()
public boolean isFlowControlEnabled()
public String getExitSignalInfo()
protected void evaluateWindowSpace(int remaining)
Channel
evaluateWindowSpace
in class Channel<SshClientContext>
protected void onRemoteEOF()
Channel
onRemoteEOF
in class Channel<SshClientContext>
protected void onLocalEOF()
Channel
onLocalEOF
in class Channel<SshClientContext>
public int getMaximumRemotePacketLength()
public int getMaximumLocalPacketLength()
Copyright © 2016. All rights reserved.