public interface Channel extends Closeable
| Modifier and Type | Method and Description |
|---|---|
CloseFuture |
close(boolean immediately)
Close this resource asynchronously and return a future.
|
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 |
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 packetSize,
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) |
void |
handleWindowAdjust(Buffer buffer) |
void |
init(ConnectionService service,
Session session,
int id) |
OpenFuture |
open(int recipient,
int rwSize,
int packetSize,
Buffer buffer)
For a server channel, this method will actually open the channel
|
int getId()
int getRecipient()
Window getLocalWindow()
Window getRemoteWindow()
Session getSession()
void handleClose()
throws IOException
IOExceptionvoid handleWindowAdjust(Buffer buffer) throws IOException
IOExceptionvoid handleRequest(Buffer buffer) throws IOException
IOExceptionvoid handleData(Buffer buffer) throws IOException
IOExceptionvoid handleExtendedData(Buffer buffer) throws IOException
IOExceptionvoid handleEof()
throws IOException
IOExceptionvoid handleFailure()
throws IOException
IOExceptionCloseFuture close(boolean immediately)
Closeableimmediately - true if the resource should be shut down abruptly,
false for a graceful closevoid init(ConnectionService service, Session session, int id) throws IOException
IOExceptionOpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer)
recipient - Recipient identifierrwSize - Read/Write window sizepacketSize - Preferred maximum packet sizebuffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedOpenFuture for the channel open requestvoid handleOpenSuccess(int recipient,
int rwSize,
int packetSize,
Buffer buffer)
throws IOException
recipient - Recipient identifierrwSize - Read/Write window sizepacketSize - Preferred maximum packet sizebuffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedIOException - If failed to handle the successvoid handleOpenFailure(Buffer buffer) throws IOException
buffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedIOException - If failed to handle the successCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.