public class ChannelSession extends AbstractServerChannel
| Modifier and Type | Class and Description |
|---|---|
static class |
ChannelSession.Factory |
protected static class |
ChannelSession.StandardEnvironment |
| Modifier and Type | Field and Description |
|---|---|
protected Command |
command |
protected CloseFuture |
commandExitFuture |
static long |
DEFAULT_COMMAND_EXIT_TIMEOUT |
protected ChannelSession.StandardEnvironment |
env |
protected java.io.OutputStream |
err |
protected java.io.OutputStream |
out |
protected ChannelDataReceiver |
receiver |
protected Buffer |
tempBuffer |
protected java.lang.String |
type |
exitStatusSentCLOSE_RECV, CLOSE_SENT, DEFAULT_PACKET_SIZE, DEFAULT_WINDOW_SIZE, eof, gracefulState, handlers, id, localWindow, recipient, remoteWindow, service, sessionCLOSED, closeFuture, GRACEFUL, IMMEDIATE, lock, log, OPENED, state| Constructor and Description |
|---|
ChannelSession() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEnvVariable(java.lang.String name,
java.lang.String value) |
protected void |
closeShell(int exitValue) |
protected void |
doWriteData(byte[] data,
int off,
int len) |
protected void |
doWriteExtendedData(byte[] data,
int off,
int len) |
protected Closeable |
getCommandCloseable() |
protected ChannelSession.StandardEnvironment |
getEnvironment() |
protected Closeable |
getInnerCloseable() |
protected int |
getPtyModeValue(PtyMode mode) |
protected boolean |
handleAgentForwarding(Buffer buffer) |
protected boolean |
handleBreak(Buffer buffer) |
protected boolean |
handleEnv(Buffer buffer) |
void |
handleEof() |
protected boolean |
handleExec(Buffer buffer) |
protected boolean |
handlePtyReq(Buffer buffer) |
java.lang.Boolean |
handleRequest(java.lang.String type,
Buffer buffer) |
protected boolean |
handleShell(Buffer buffer) |
protected boolean |
handleSignal(Buffer buffer) |
protected boolean |
handleSubsystem(Buffer buffer) |
protected boolean |
handleWindowChange(Buffer buffer) |
protected boolean |
handleX11Forwarding(Buffer buffer) |
protected void |
postClose() |
protected void |
prepareCommand() |
void |
setDataReceiver(ChannelDataReceiver receiver)
For
Command to install ChannelDataReceiver. |
doInit, handleOpenFailure, handleOpenSuccess, open, sendExitStatusaddRequestHandler, configureWindow, getGracefulCloseable, getId, getLocalWindow, getRecipient, getRemoteWindow, getSession, handleClose, handleData, handleExtendedData, handleFailure, handleRequest, handleWindowAdjust, init, notifyStateChanged, sendEof, sendWindowAdjust, toString, writePacketdoCloseGracefully, doCloseImmediatelyclosepublic static final long DEFAULT_COMMAND_EXIT_TIMEOUT
protected java.lang.String type
protected java.io.OutputStream out
protected java.io.OutputStream err
protected Command command
protected ChannelDataReceiver receiver
protected ChannelSession.StandardEnvironment env
protected Buffer tempBuffer
protected final CloseFuture commandExitFuture
protected Closeable getInnerCloseable()
getInnerCloseable in class AbstractChannelprotected Closeable getCommandCloseable()
protected void postClose()
postClose in class AbstractChannelpublic void handleEof()
throws java.io.IOException
handleEof in interface ChannelhandleEof in class AbstractChanneljava.io.IOExceptionprotected void doWriteData(byte[] data,
int off,
int len)
throws java.io.IOException
doWriteData in class AbstractChanneljava.io.IOExceptionprotected void doWriteExtendedData(byte[] data,
int off,
int len)
throws java.io.IOException
doWriteExtendedData in class AbstractChanneljava.io.IOExceptionpublic java.lang.Boolean handleRequest(java.lang.String type,
Buffer buffer)
throws java.io.IOException
java.io.IOExceptionprotected boolean handleEnv(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handlePtyReq(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleWindowChange(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleSignal(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleBreak(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleShell(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleExec(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleSubsystem(Buffer buffer) throws java.io.IOException
java.io.IOExceptionpublic void setDataReceiver(ChannelDataReceiver receiver)
Command to install ChannelDataReceiver.
When you do this, Command.setInputStream(InputStream)
will no longer be invoked. If you call this method from Command.start(Environment),
the input stream you received in Command.setInputStream(InputStream) will
not read any data.protected void prepareCommand()
throws java.io.IOException
java.io.IOExceptionprotected int getPtyModeValue(PtyMode mode)
protected boolean handleAgentForwarding(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected boolean handleX11Forwarding(Buffer buffer) throws java.io.IOException
java.io.IOExceptionprotected void addEnvVariable(java.lang.String name,
java.lang.String value)
protected ChannelSession.StandardEnvironment getEnvironment()
protected void closeShell(int exitValue)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.