public class ChannelSession extends AbstractClientChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulStateAbstractCloseable.StateClientChannel.StreamingAttributeRepository.AttributeKey<T>| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INPUT_STREAM_PUMP_CHUNK_SIZE
Default (and also minimum) value of "stdin-pump-chunk-size"
|
static java.lang.String |
INPUT_STREAM_PUMP_CHUNK_SIZE
On some platforms, a call to always throws an
IOException. |
private java.util.concurrent.Future<?> |
pumper |
private CloseableExecutorService |
pumperService |
asyncErr, asyncIn, asyncOut, err, exitSignalHolder, exitStatusHolder, in, invertedErr, invertedIn, invertedOut, opened, openFailureLang, openFailureMsg, openFailureReason, openFuture, out, streamingchannelListenerProxy, channelListeners, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, servicecloseFuture, futureLock, statelogCHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMEMPTYNONECLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
ChannelSession() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeImmediately0() |
protected void |
doOpen() |
protected Closeable |
getInnerCloseable() |
protected RequestHandler.Result |
handleInternalRequest(java.lang.String req,
boolean wantReply,
Buffer buffer)
Called by
AbstractChannel.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 |
pumpInputStream() |
protected int |
securedRead(java.io.InputStream in,
int maxChunkSize,
byte[] buf,
int off,
int len) |
addChannelSignalRequestHandlers, doWriteData, doWriteExtendedData, getAsyncErr, getAsyncIn, getAsyncOut, getChannelState, getChannelType, getErr, getExitSignal, getExitStatus, getIn, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, open, open, setErr, setIn, setOut, setStreaming, updateCurrentChannelState, waitForaddChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelListenerProxy, getChannelStreamPacketWriterResolver, getExecutorService, getId, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleUnknownChannelRequest, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamPacketWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamPacketWriterResolver, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacketdoCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClientSession, validateCommandExitStatusCode, waitForaddRequestHandler, addRequestHandlers, getId, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute, resolveAttributegetSession, getSessionContextaddChannelListener, getChannelListenerProxy, removeChannelListenergetBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringPropertyclearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeattributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePaircalculatePadLength, writePacketgetChannelStreamPacketWriterResolver, resolveChannelStreamPacketWriter, resolveChannelStreamPacketWriterResolver, setChannelStreamPacketWriterResolveraddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerpublic static final java.lang.String INPUT_STREAM_PUMP_CHUNK_SIZE
IOException. So we need to protect against that and chunk the call into smaller calls. This problem was
found on Windows, JDK 1.6.0_03-b05.public static final int DEFAULT_INPUT_STREAM_PUMP_CHUNK_SIZE
private CloseableExecutorService pumperService
private java.util.concurrent.Future<?> pumper
protected void doOpen()
throws java.io.IOException
doOpen in class AbstractClientChanneljava.io.IOExceptionprotected RequestHandler.Result handleInternalRequest(java.lang.String req, boolean wantReply, Buffer buffer) throws java.io.IOException
AbstractChannelAbstractChannel.handleUnknownChannelRequest(String, boolean, Buffer) in order to allow channel request
handling if none of the registered handlers processed the request - last chance.handleInternalRequest in class AbstractChannelreq - The request typewantReply - Whether reply is requestedbuffer - The Buffer containing extra request-specific datanull or Unsupported and reply is required then a
failure message will be sentjava.io.IOException - If failed to process the request internallyprotected RequestHandler.Result handleXonXoff(Buffer buffer, boolean wantReply) throws java.io.IOException
java.io.IOExceptionprotected Closeable getInnerCloseable()
getInnerCloseable in class AbstractClientChannelprotected void closeImmediately0()
protected void pumpInputStream()
protected int securedRead(java.io.InputStream in,
int maxChunkSize,
byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOException