Interface BookieProtoEncoding.EnDecoder

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object decode​(io.netty.buffer.ByteBuf packet)
      Decode a packet into an object.
      java.lang.Object encode​(java.lang.Object object, io.netty.buffer.ByteBufAllocator allocator)
      Encode a object into channel buffer.
    • Method Detail

      • encode

        java.lang.Object encode​(java.lang.Object object,
                                io.netty.buffer.ByteBufAllocator allocator)
                         throws java.lang.Exception
        Encode a object into channel buffer.
        Parameters:
        object - object.
        Returns:
        encode buffer.
        Throws:
        java.lang.Exception
      • decode

        java.lang.Object decode​(io.netty.buffer.ByteBuf packet)
                         throws java.lang.Exception
        Decode a packet into an object.
        Parameters:
        packet - received packet.
        Returns:
        parsed object.
        Throws:
        java.lang.Exception