Package org.drasyl.channel
Class ChannelInboundBuffer
java.lang.Object
org.drasyl.channel.ChannelInboundBuffer
(Transport implementors only) an internal data structure used by
JavaDrasylChannel to store
its pending inbound read requests.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(io.netty.buffer.ByteBuf msg) voidclose()booleanisEmpty()Returnstrueif there are no pending inbound read requests messages in thisChannelInboundBufferorfalseotherwise.booleanReturnstrueif and only if the total number of pending bytes did not exceed the read watermark of theChannel.io.netty.buffer.ByteBufremove()Return the current message to read ornulland removes it from the buffer ornullif nothing is there to read.
-
Method Details
-
addMessage
public void addMessage(io.netty.buffer.ByteBuf msg) -
isNotFull
public boolean isNotFull()Returnstrueif 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 ornulland removes it from the buffer ornullif nothing is there to read. -
isEmpty
public boolean isEmpty()Returnstrueif there are no pending inbound read requests messages in thisChannelInboundBufferorfalseotherwise. -
close
public void close()
-