org.apache.sshd.client.channel
Class AbstractClientChannel
java.lang.Object
org.apache.sshd.common.channel.AbstractChannel
org.apache.sshd.client.channel.AbstractClientChannel
- All Implemented Interfaces:
- ClientChannel, Channel
- Direct Known Subclasses:
- AgentForwardSupport.AgentForwardedChannel, ChannelSession, TcpipForwardSupport.ChannelForwardedTcpip, X11ForwardSupport.ChannelForwardedX11
public abstract class AbstractClientChannel
- extends AbstractChannel
- implements ClientChannel
TODO Add javadoc
- Author:
- Apache MINA SSHD Project
Fields inherited from class org.apache.sshd.common.channel.AbstractChannel |
closeFuture, closing, DEFAULT_PACKET_SIZE, DEFAULT_WINDOW_SIZE, eof, id, localWindow, lock, log, recipient, remoteWindow, session |
Method Summary |
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)
|
Methods inherited from class org.apache.sshd.common.channel.AbstractChannel |
configureWindow, getId, getLocalWindow, getRecipient, getSession, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleWindowAdjust, init, sendEof, sendWindowAdjust |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
opened
protected boolean opened
type
protected final String type
in
protected InputStream in
out
protected OutputStream out
err
protected OutputStream err
exitStatus
protected Integer exitStatus
exitSignal
protected String exitSignal
openFailureReason
protected int openFailureReason
openFailureMsg
protected String openFailureMsg
openFuture
protected OpenFuture openFuture
AbstractClientChannel
protected AbstractClientChannel(String type)
getIn
public InputStream getIn()
setIn
public void setIn(InputStream in)
- Specified by:
setIn
in interface ClientChannel
getOut
public OutputStream getOut()
setOut
public void setOut(OutputStream out)
- Specified by:
setOut
in interface ClientChannel
getErr
public OutputStream getErr()
setErr
public void setErr(OutputStream err)
- Specified by:
setErr
in interface ClientChannel
close
public CloseFuture close(boolean immediately)
- Specified by:
close
in interface ClientChannel
- Specified by:
close
in interface Channel
- Overrides:
close
in class AbstractChannel
doClose
protected void doClose()
- Overrides:
doClose
in class AbstractChannel
waitFor
public int waitFor(int mask,
long timeout)
- Specified by:
waitFor
in interface ClientChannel
internalOpen
protected OpenFuture internalOpen()
throws Exception
- Throws:
Exception
open
public OpenFuture open(int recipient,
int rwsize,
int rmpsize,
Buffer buffer)
- Description copied from interface:
Channel
- For a server channel, this method will actually open the channel
- Specified by:
open
in interface Channel
handleOpenSuccess
public void handleOpenSuccess(int recipient,
int rwsize,
int rmpsize,
Buffer buffer)
- Description copied from interface:
Channel
- For a client channel, this method will be called internally by the session when the confirmation
has been received.
- Specified by:
handleOpenSuccess
in interface Channel
doOpen
protected abstract void doOpen()
throws Exception
- Throws:
Exception
handleOpenFailure
public void handleOpenFailure(Buffer buffer)
- Description copied from interface:
Channel
- For a client channel, this method will be called internally by the session when
the server has rejected this channel opening.
- Specified by:
handleOpenFailure
in interface Channel
doWriteData
protected void doWriteData(byte[] data,
int off,
int len)
throws IOException
- Specified by:
doWriteData
in class AbstractChannel
- Throws:
IOException
doWriteExtendedData
protected void doWriteExtendedData(byte[] data,
int off,
int len)
throws IOException
- Specified by:
doWriteExtendedData
in class AbstractChannel
- Throws:
IOException
handleRequest
public void handleRequest(Buffer buffer)
throws IOException
- Specified by:
handleRequest
in interface Channel
- Overrides:
handleRequest
in class AbstractChannel
- Throws:
IOException
getExitStatus
public Integer getExitStatus()
- Specified by:
getExitStatus
in interface ClientChannel
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.