public abstract class AbstractClientChannel extends AbstractChannel implements ClientChannel
| Modifier and Type | Field and Description |
|---|---|
protected OutputStream |
err |
protected String |
exitSignal |
protected Integer |
exitStatus |
protected InputStream |
in |
protected boolean |
opened |
protected String |
openFailureMsg |
protected int |
openFailureReason |
protected OpenFuture |
openFuture |
protected OutputStream |
out |
protected String |
type |
closeFuture, closing, DEFAULT_PACKET_SIZE, DEFAULT_WINDOW_SIZE, eof, id, localWindow, lock, log, recipient, remoteWindow, sessionCHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM, CLOSED, EOF, EXIT_SIGNAL, EXIT_STATUS, OPENED, STDERR_DATA, STDOUT_DATA, TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClientChannel(String type) |
| Modifier and Type | Method and Description |
|---|---|
CloseFuture |
close(boolean immediately) |
protected void |
doClose() |
protected abstract void |
doOpen() |
protected void |
doWriteData(byte[] data,
int off,
int len) |
protected void |
doWriteExtendedData(byte[] data,
int off,
int len) |
OutputStream |
getErr() |
Integer |
getExitStatus() |
InputStream |
getIn() |
OutputStream |
getOut() |
void |
handleOpenFailure(Buffer buffer)
For a client channel, this method will be called internally by the session when
the server has rejected this channel opening.
|
void |
handleOpenSuccess(int recipient,
int rwsize,
int rmpsize,
Buffer buffer)
For a client channel, this method will be called internally by the session when the confirmation
has been received.
|
void |
handleRequest(Buffer buffer) |
protected OpenFuture |
internalOpen() |
OpenFuture |
open(int recipient,
int rwsize,
int rmpsize,
Buffer buffer)
For a server channel, this method will actually open the channel
|
void |
setErr(OutputStream err) |
void |
setIn(InputStream in) |
void |
setOut(OutputStream out) |
int |
waitFor(int mask,
long timeout) |
configureWindow, getId, getLocalWindow, getRecipient, getSession, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleWindowAdjust, init, sendEof, sendWindowAdjustclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitopenprotected boolean opened
protected final String type
protected InputStream in
protected OutputStream out
protected OutputStream err
protected Integer exitStatus
protected String exitSignal
protected int openFailureReason
protected String openFailureMsg
protected OpenFuture openFuture
protected AbstractClientChannel(String type)
public InputStream getIn()
public void setIn(InputStream in)
setIn in interface ClientChannelpublic OutputStream getOut()
public void setOut(OutputStream out)
setOut in interface ClientChannelpublic OutputStream getErr()
public void setErr(OutputStream err)
setErr in interface ClientChannelpublic CloseFuture close(boolean immediately)
close in interface ClientChannelclose in interface Channelclose in class AbstractChannelprotected void doClose()
doClose in class AbstractChannelpublic int waitFor(int mask,
long timeout)
waitFor in interface ClientChannelprotected OpenFuture internalOpen() throws Exception
Exceptionpublic OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer)
Channelpublic void handleOpenSuccess(int recipient,
int rwsize,
int rmpsize,
Buffer buffer)
ChannelhandleOpenSuccess in interface Channelpublic void handleOpenFailure(Buffer buffer)
ChannelhandleOpenFailure in interface Channelprotected void doWriteData(byte[] data,
int off,
int len)
throws IOException
doWriteData in class AbstractChannelIOExceptionprotected void doWriteExtendedData(byte[] data,
int off,
int len)
throws IOException
doWriteExtendedData in class AbstractChannelIOExceptionpublic void handleRequest(Buffer buffer) throws IOException
handleRequest in interface ChannelhandleRequest in class AbstractChannelIOExceptionpublic Integer getExitStatus()
getExitStatus in interface ClientChannelCopyright © 2008-2012 Apache Software Foundation. All Rights Reserved.