Interface BookieProtoEncoding.EnDecoder

All Known Implementing Classes:
BookieProtoEncoding.RequestEnDeCoderPreV3, BookieProtoEncoding.RequestEnDecoderV3, BookieProtoEncoding.ResponseEnDeCoderPreV3, BookieProtoEncoding.ResponseEnDecoderV3
Enclosing class:
BookieProtoEncoding

public static interface BookieProtoEncoding.EnDecoder
An encoder/decoder interface for the Bookkeeper protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(io.netty.buffer.ByteBuf packet)
    Decode a packet into an object.
    encode(Object object, io.netty.buffer.ByteBufAllocator allocator)
    Encode a object into channel buffer.
  • Method Details

    • encode

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

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