public abstract class AbstractChannel extends Object implements Channel
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closedByOtherSide |
protected CloseFuture |
closeFuture |
protected AtomicBoolean |
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 and Description |
|---|
AbstractChannel() |
| Modifier and Type | Method and Description |
|---|---|
CloseFuture |
close(boolean immediately) |
protected void |
configureWindow() |
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() |
Window |
getRemoteWindow() |
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 |
notifyStateChanged() |
protected void |
postClose() |
protected CloseFuture |
preClose(boolean immediately) |
protected void |
sendEof() |
protected void |
sendWindowAdjust(int len) |
protected void |
writePacket(Buffer buffer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleOpenFailure, handleOpenSuccess, openpublic static final int DEFAULT_WINDOW_SIZE
public static final int DEFAULT_PACKET_SIZE
protected final org.slf4j.Logger log
protected final Object lock
protected final Window localWindow
protected final Window remoteWindow
protected Session session
protected int id
protected int recipient
protected final CloseFuture closeFuture
protected volatile boolean eof
protected final AtomicBoolean closing
protected boolean closedByOtherSide
public int getRecipient()
public Window getLocalWindow()
getLocalWindow in interface Channelpublic Window getRemoteWindow()
getRemoteWindow in interface Channelpublic Session getSession()
getSession in interface Channelpublic void handleRequest(Buffer buffer) throws IOException
handleRequest in interface ChannelIOExceptionprotected void notifyStateChanged()
public CloseFuture close(boolean immediately)
public void handleClose()
throws IOException
handleClose in interface ChannelIOExceptionprotected CloseFuture preClose(boolean immediately)
protected void postClose()
protected void writePacket(Buffer buffer) throws IOException
IOExceptionpublic void handleData(Buffer buffer) throws IOException
handleData in interface ChannelIOExceptionpublic void handleExtendedData(Buffer buffer) throws IOException
handleExtendedData in interface ChannelIOExceptionpublic void handleEof()
throws IOException
handleEof in interface ChannelIOExceptionpublic void handleWindowAdjust(Buffer buffer) throws IOException
handleWindowAdjust in interface ChannelIOExceptionpublic void handleFailure()
throws IOException
handleFailure in interface ChannelIOExceptionprotected abstract void doWriteData(byte[] data,
int off,
int len)
throws IOException
IOExceptionprotected abstract void doWriteExtendedData(byte[] data,
int off,
int len)
throws IOException
IOExceptionprotected void sendEof()
throws IOException
IOExceptionprotected void configureWindow()
protected void sendWindowAdjust(int len)
throws IOException
IOExceptionCopyright © 2008–2013 The Apache Software Foundation. All rights reserved.