org.apache.sshd.common.channel
Class AbstractChannel

java.lang.Object
  extended by org.apache.sshd.common.channel.AbstractChannel
All Implemented Interfaces:
Channel
Direct Known Subclasses:
AbstractClientChannel, AbstractServerChannel

public abstract class AbstractChannel
extends Object
implements Channel

TODO Add javadoc

Author:
Apache MINA SSHD Project

Field Summary
protected  CloseFuture closeFuture
           
protected  boolean closing
           
static int DEFAULT_PACKET_SIZE
           
static int DEFAULT_WINDOW_SIZE
           
protected  boolean eof
           
protected  int id
           
protected  Window localWindow
           
protected  Object lock
           
protected  org.slf4j.Logger log
           
protected  int recipient
           
protected  Window remoteWindow
           
protected  Session session
           
 
Constructor Summary
AbstractChannel()
           
 
Method Summary
 CloseFuture close(boolean immediately)
           
protected  void configureWindow()
           
protected  void doClose()
           
protected abstract  void doWriteData(byte[] data, int off, int len)
           
protected abstract  void doWriteExtendedData(byte[] data, int off, int len)
           
 int getId()
           
 Window getLocalWindow()
           
 int getRecipient()
           
 Session getSession()
           
 void handleClose()
           
 void handleData(Buffer buffer)
           
 void handleEof()
           
 void handleExtendedData(Buffer buffer)
           
 void handleFailure()
           
 void handleRequest(Buffer buffer)
           
 void handleWindowAdjust(Buffer buffer)
           
 void init(Session session, int id)
           
protected  void sendEof()
           
protected  void sendWindowAdjust(int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.sshd.common.Channel
handleOpenFailure, handleOpenSuccess, open
 

Field Detail

DEFAULT_WINDOW_SIZE

public static final int DEFAULT_WINDOW_SIZE
See Also:
Constant Field Values

DEFAULT_PACKET_SIZE

public static final int DEFAULT_PACKET_SIZE
See Also:
Constant Field Values

log

protected final org.slf4j.Logger log

lock

protected final Object lock

localWindow

protected final Window localWindow

remoteWindow

protected final Window remoteWindow

session

protected Session session

id

protected int id

recipient

protected int recipient

eof

protected boolean eof

closeFuture

protected final CloseFuture closeFuture

closing

protected boolean closing
Constructor Detail

AbstractChannel

public AbstractChannel()
Method Detail

getId

public int getId()
Specified by:
getId in interface Channel

getRecipient

public int getRecipient()

getLocalWindow

public Window getLocalWindow()
Specified by:
getLocalWindow in interface Channel

getSession

public Session getSession()
Specified by:
getSession in interface Channel

handleRequest

public void handleRequest(Buffer buffer)
                   throws IOException
Specified by:
handleRequest in interface Channel
Throws:
IOException

init

public void init(Session session,
                 int id)
Specified by:
init in interface Channel

close

public CloseFuture close(boolean immediately)
Specified by:
close in interface Channel

handleClose

public void handleClose()
                 throws IOException
Specified by:
handleClose in interface Channel
Throws:
IOException

doClose

protected void doClose()

handleData

public void handleData(Buffer buffer)
                throws IOException
Specified by:
handleData in interface Channel
Throws:
IOException

handleExtendedData

public void handleExtendedData(Buffer buffer)
                        throws IOException
Specified by:
handleExtendedData in interface Channel
Throws:
IOException

handleEof

public void handleEof()
               throws IOException
Specified by:
handleEof in interface Channel
Throws:
IOException

handleWindowAdjust

public void handleWindowAdjust(Buffer buffer)
                        throws IOException
Specified by:
handleWindowAdjust in interface Channel
Throws:
IOException

handleFailure

public void handleFailure()
                   throws IOException
Specified by:
handleFailure in interface Channel
Throws:
IOException

doWriteData

protected abstract void doWriteData(byte[] data,
                                    int off,
                                    int len)
                             throws IOException
Throws:
IOException

doWriteExtendedData

protected abstract void doWriteExtendedData(byte[] data,
                                            int off,
                                            int len)
                                     throws IOException
Throws:
IOException

sendEof

protected void sendEof()
                throws IOException
Throws:
IOException

configureWindow

protected void configureWindow()

sendWindowAdjust

protected void sendWindowAdjust(int len)
                         throws IOException
Throws:
IOException


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.