public class ChannelSession extends AbstractClientChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState
AbstractCloseable.State
ClientChannel.ClientChannelEvent, ClientChannel.Streaming
asyncErr, asyncIn, asyncOut, err, exitSignalHolder, exitStatusHolder, in, invertedErr, invertedIn, invertedOut, opened, openFailureLang, openFailureMsg, openFailureReason, openFuture, out, streaming, type
channelListenerProxy, channelListeners, eof, executor, gracefulFuture, gracefulState, handlers, localWindow, remoteWindow, RESPONSE_BUFFER_GROWTH_FACTOR, service, shutdownExecutor
closeFuture, lock, state
log
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
Constructor and Description |
---|
ChannelSession() |
Modifier and Type | Method and Description |
---|---|
protected void |
doCloseImmediately()
doCloseImmediately is called once and only once
with state == Immediate
|
protected void |
doOpen() |
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,
byte[] buf,
int off,
int len) |
addChannelSignalRequestHandlers, doWriteData, doWriteExtendedData, getAsyncErr, getAsyncIn, getAsyncOut, getErr, getExitSignal, getExitStatus, getIn, getInnerCloseable, getInvertedErr, getInvertedIn, getInvertedOut, getOut, getStreaming, handleOpenFailure, handleOpenSuccess, handleWindowAdjust, open, open, setErr, setIn, setOut, setStreaming, waitFor
addChannelListener, addPendingRequest, addRequestHandler, configureWindow, getChannelListenerProxy, getExecutorService, getId, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleUnknownChannelRequest, init, isEofSignalled, isShutdownOnExit, notifyStateChanged, preClose, removeChannelListener, removePendingRequest, sendEof, sendResponse, sendWindowAdjust, setEofSignalled, setExecutorService, setRecipient, setShutdownOnExit, toString, writePacket
doCloseGracefully
builder, close, isClosed, isClosing
close, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close
getId, getLocalWindow, getRecipient, getRemoteWindow, getSession, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, init
addChannelListener, getChannelListenerProxy, removeChannelListener
getParentPropertyResolver, getProperties
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 void doCloseImmediately()
AbstractCloseable
doCloseImmediately is called once and only once with state == Immediate
Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing
doCloseImmediately
in class AbstractChannel
protected void pumpInputStream()
protected int securedRead(InputStream in, byte[] buf, int off, int len) throws IOException
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.