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, session
CHANNEL_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, sendWindowAdjust
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
open
protected 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 ClientChannel
public OutputStream getOut()
public void setOut(OutputStream out)
setOut
in interface ClientChannel
public OutputStream getErr()
public void setErr(OutputStream err)
setErr
in interface ClientChannel
public CloseFuture close(boolean immediately)
close
in interface ClientChannel
close
in interface Channel
close
in class AbstractChannel
protected void doClose()
doClose
in class AbstractChannel
public int waitFor(int mask, long timeout)
waitFor
in interface ClientChannel
protected OpenFuture internalOpen() throws Exception
Exception
public OpenFuture open(int recipient, int rwsize, int rmpsize, Buffer buffer)
Channel
public void handleOpenSuccess(int recipient, int rwsize, int rmpsize, Buffer buffer)
Channel
handleOpenSuccess
in interface Channel
public void handleOpenFailure(Buffer buffer)
Channel
handleOpenFailure
in interface Channel
protected void doWriteData(byte[] data, int off, int len) throws IOException
doWriteData
in class AbstractChannel
IOException
protected void doWriteExtendedData(byte[] data, int off, int len) throws IOException
doWriteExtendedData
in class AbstractChannel
IOException
public void handleRequest(Buffer buffer) throws IOException
handleRequest
in interface Channel
handleRequest
in class AbstractChannel
IOException
public Integer getExitStatus()
getExitStatus
in interface ClientChannel
Copyright © 2008–2013 The Apache Software Foundation. All rights reserved.