public class ChannelSession extends AbstractClientChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState
AbstractCloseable.State
AttributeRepository.AttributeKey<T>
StreamingChannel.Streaming
Modifier and Type | Field and Description |
---|---|
protected Future<?> |
pumper |
protected CloseableExecutorService |
pumperService |
asyncErr, asyncIn, asyncOut, err, exitSignalHolder, exitStatusHolder, in, invertedErr, invertedIn, invertedOut, opened, openFailureLang, openFailureMsg, openFailureReason, openFuture, out, redirectErrorStream, streaming
channelListenerProxy, channelListeners, closeSignaled, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service, unregisterSignaled
closeFuture, futureLock, state
log
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
EMPTY
NONE
Constructor and Description |
---|
ChannelSession() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeImmediately0() |
protected void |
doOpen() |
protected Closeable |
getInnerCloseable() |
protected RequestHandler.Result |
handleInternalRequest(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(InputStream in,
int maxChunkSize,
byte[] buf,
int off,
int len) |
protected void |
sendEnvVariables(Session session) |
Object |
setEnv(String key,
Object value) |
addChannelSignalRequestHandlers, doWriteData, doWriteExtendedData, getAsyncErr, getAsyncIn, getAsyncOut, getChannelState, getChannelType, getErr, getExitSignal, getExitStatus, getIn, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, isRedirectErrorStream, mayWrite, open, open, setErr, setIn, setOut, setRedirectErrorStream, setStreaming, updateCurrentChannelState, waitFor
addChannelListener, addPendingRequest, addRequestHandler, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, getAttribute, getAttributesCount, getChannelId, getChannelListenerProxy, getChannelStreamWriterResolver, getExecutorService, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRegistrationResult, handleChannelRequest, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleUnknownChannelRequest, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamWriterResolver, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacket
doCloseGracefully, doCloseImmediately
addCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListener
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClientSession, validateCommandExitStatusCode, waitFor
addRequestHandler, addRequestHandlers, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleChannelRegistrationResult, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute, resolveAttribute, writePacket
getSession, getSessionContext
getChannelId
addChannelListener, getChannelListenerProxy, removeChannelListener
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty, isEmpty
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
attributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePair
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
protected CloseableExecutorService pumperService
protected Future<?> pumper
protected void doOpen() throws IOException
doOpen
in class AbstractClientChannel
IOException
protected RequestHandler.Result handleInternalRequest(String req, boolean wantReply, Buffer buffer) throws IOException
AbstractChannel
AbstractChannel.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 AbstractChannel
req
- 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 sentIOException
- If failed to process the request internallyprotected RequestHandler.Result handleXonXoff(Buffer buffer, boolean wantReply) throws IOException
IOException
protected Closeable getInnerCloseable()
getInnerCloseable
in class AbstractClientChannel
protected void closeImmediately0()
protected void pumpInputStream()
protected int securedRead(InputStream in, int maxChunkSize, byte[] buf, int off, int len) throws IOException
IOException
public Object setEnv(String key, Object value)
key
- The (never null
) key (Note: may be empty...)value
- The value to set - if null
then the pre-existing value for the key (if any) is
removed.null
if no previous value set for the key.protected void sendEnvVariables(Session session) throws IOException
IOException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.