AbstractNioChannel base class for Channels that operate on bytes.
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| protected | AbstractNioByteChannel(P
the parent parent, EventLoop Channel by which this instance was created.
May be nullthe eventLoop, WriteHandleFactory EventLoop to use for IO.the defaultWriteHandleFactory, SelectableChannel WriteHandleFactory that is used by default.the underlying ch)SelectableChannel on which it operatesCreate a new instance |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract int | |
| protected final boolean | doReadNow(AbstractChannel<P, L, R>.
the readSinkReadSink that should be called with messages that are read from the transport
to propagate these.Implements abstract io. ReadSink#processRead(int, int, Object).
|
| protected abstract int | Returns: amount the amount of written bytesthe buf)Buffer from which the bytes should be writtenWrite bytes form the given |
| protected abstract long | Returns: amount the amount of written bytesthe region)FileRegion from which the bytes should be writtenWrite a |
| protected void | doWriteNow(AbstractChannel<P, L, R>.
the writeSinkWriteSink that must be completed with the write
progress.
WriteSink#complete(long, long, int, boolean) or
WriteSink#complete(long, Throwable, boolean) must be called
exactly once before this method returns non-exceptional.Implements abstract io. false or there are
no more messages to write.
|
| protected final Object | filterOutboundMessage(Object
the message to filter / convert. msg)Overrides io. AbstractChannel, so that
the Channel implementation converts the message to another.
|
| EXPECTED_TYPES | back to summary |
|---|---|
| private static final String EXPECTED_TYPES | |
| AbstractNioByteChannel | back to summary |
|---|---|
| protected AbstractNioByteChannel(P parent, EventLoop eventLoop, WriteHandleFactory defaultWriteHandleFactory, SelectableChannel ch) Create a new instance
| |
| doReadBytes | back to summary |
|---|---|
| protected abstract int doReadBytes(Buffer buf) throws Exception Read bytes into the given | |
| doReadNow | back to summary |
|---|---|
| protected final boolean doReadNow(AbstractChannel<P, L, R>. Implements abstract io. Doc from io. Try to read a message from the transport and dispatch it via
| |
| doWriteBytes | back to summary |
|---|---|
| protected abstract int doWriteBytes(Buffer buf) throws Exception Write bytes form the given | |
| doWriteFileRegion | back to summary |
|---|---|
| protected abstract long doWriteFileRegion(FileRegion region) throws Exception Write a
| |
| doWriteNow | back to summary |
|---|---|
| protected void doWriteNow(AbstractChannel<P, L, R>. Implements abstract io. Doc from io. Called in a loop when writes should be performed until this method returns
| |
| filterOutboundMessage | back to summary |
|---|---|
| protected final Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to to the outbound queue of this | |