Package org.drasyl.channel
Class ChannelInboundBuffer
java.lang.Object
org.drasyl.channel.ChannelInboundBuffer
(Transport implementors only) an internal data structure used by
DrasylChannel
to store
its pending inbound read requests.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMessage
(io.netty.buffer.ByteBuf msg) void
close()
boolean
isEmpty()
Returnstrue
if there are no pending inbound read requests messages in thisChannelInboundBuffer
orfalse
otherwise.boolean
Returnstrue
if and only if the total number of pending bytes did not exceed the read watermark of theChannel
.io.netty.buffer.ByteBuf
remove()
Return the current message to read ornull
and removes it from the buffer ornull
if nothing is there to read.
-
Method Details
-
addMessage
public void addMessage(io.netty.buffer.ByteBuf msg) -
isNotFull
public boolean isNotFull()Returnstrue
if and only if the total number of pending bytes did not exceed the read watermark of theChannel
. -
remove
public io.netty.buffer.ByteBuf remove()Return the current message to read ornull
and removes it from the buffer ornull
if nothing is there to read. -
isEmpty
public boolean isEmpty()Returnstrue
if there are no pending inbound read requests messages in thisChannelInboundBuffer
orfalse
otherwise. -
close
public void close()
-