Interface Send

  • All Superinterfaces:
    io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted
    All Known Subinterfaces:
    SendWithCorrelationId
    All Known Implementing Classes:
    BoundedByteBufferSend

    public interface Send
    extends io.netty.buffer.ByteBufHolder
    Any data that needs to be sent over the network can implement this interface
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      io.netty.buffer.ByteBuf content()
      Return the data which is held by this ByteBufHolder.
      boolean isSendComplete()
      Returns true if the all data has been written
      long sizeInBytes()
      The total size in bytes that needs to be written to the channel
      default void writeTo​(AsyncWritableChannel channel, Callback<java.lang.Long> callback)
      Placeholder to support AsyncWritableChannel
      long writeTo​(java.nio.channels.WritableByteChannel channel)
      Writes content into the provided channel
      • Methods inherited from interface io.netty.buffer.ByteBufHolder

        copy, duplicate, replace, retain, retain, retainedDuplicate, touch, touch
      • Methods inherited from interface io.netty.util.ReferenceCounted

        refCnt, release, release
    • Method Detail

      • writeTo

        long writeTo​(java.nio.channels.WritableByteChannel channel)
              throws java.io.IOException
        Writes content into the provided channel
        Parameters:
        channel - The channel into which data needs to be written to
        Returns:
        Number of bytes written
        Throws:
        java.io.IOException
      • isSendComplete

        boolean isSendComplete()
        Returns true if the all data has been written
        Returns:
        True if all the data has been written else false
      • sizeInBytes

        long sizeInBytes()
        The total size in bytes that needs to be written to the channel
        Returns:
        The size of the data in bytes to be written
      • content

        io.netty.buffer.ByteBuf content()
        Return the data which is held by this ByteBufHolder.
        Specified by:
        content in interface io.netty.buffer.ByteBufHolder