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:
- AgentForwardedChannel, AgentForwardedChannel, ChannelDirectTcpip, ChannelSession, TcpipForwardSupport.ChannelForwardedTcpip, 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 |
| Fields inherited from interface org.apache.sshd.ClientChannel |
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM, CLOSED, EOF, EXIT_SIGNAL, EXIT_STATUS, OPENED, STDERR_DATA, STDOUT_DATA, TIMEOUT |
|
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)
|
java.io.OutputStream |
getErr()
|
java.lang.Integer |
getExitStatus()
|
java.io.InputStream |
getIn()
|
java.io.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(java.io.OutputStream err)
|
void |
setIn(java.io.InputStream in)
|
void |
setOut(java.io.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 java.lang.String type
in
protected java.io.InputStream in
out
protected java.io.OutputStream out
err
protected java.io.OutputStream err
exitStatus
protected java.lang.Integer exitStatus
exitSignal
protected java.lang.String exitSignal
openFailureReason
protected int openFailureReason
openFailureMsg
protected java.lang.String openFailureMsg
openFuture
protected OpenFuture openFuture
AbstractClientChannel
protected AbstractClientChannel(java.lang.String type)
getIn
public java.io.InputStream getIn()
setIn
public void setIn(java.io.InputStream in)
- Specified by:
setIn in interface ClientChannel
getOut
public java.io.OutputStream getOut()
setOut
public void setOut(java.io.OutputStream out)
- Specified by:
setOut in interface ClientChannel
getErr
public java.io.OutputStream getErr()
setErr
public void setErr(java.io.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 java.lang.Exception
- Throws:
java.lang.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 java.lang.Exception
- Throws:
java.lang.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 java.io.IOException
- Specified by:
doWriteData in class AbstractChannel
- Throws:
java.io.IOException
doWriteExtendedData
protected void doWriteExtendedData(byte[] data,
int off,
int len)
throws java.io.IOException
- Specified by:
doWriteExtendedData in class AbstractChannel
- Throws:
java.io.IOException
handleRequest
public void handleRequest(Buffer buffer)
throws java.io.IOException
- Specified by:
handleRequest in interface Channel- Overrides:
handleRequest in class AbstractChannel
- Throws:
java.io.IOException
getExitStatus
public java.lang.Integer getExitStatus()
- Specified by:
getExitStatus in interface ClientChannel
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.