Package org.apache.bookkeeper.proto
Class BookieProtoEncoding.RequestEnDeCoderPreV3
- java.lang.Object
-
- org.apache.bookkeeper.proto.BookieProtoEncoding.RequestEnDeCoderPreV3
-
- All Implemented Interfaces:
BookieProtoEncoding.EnDecoder
- Enclosing class:
- BookieProtoEncoding
public static class BookieProtoEncoding.RequestEnDeCoderPreV3 extends java.lang.Object implements BookieProtoEncoding.EnDecoder
An encoder/decoder for the Bookkeeper protocol before version 3.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) com.google.protobuf.ExtensionRegistry
extensionRegistry
-
Constructor Summary
Constructors Constructor Description RequestEnDeCoderPreV3(com.google.protobuf.ExtensionRegistry extensionRegistry)
-
Method Summary
All Methods Instance Methods Concrete 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 msg, io.netty.buffer.ByteBufAllocator allocator)
Encode a object into channel buffer.
-
-
-
Method Detail
-
encode
public java.lang.Object encode(java.lang.Object msg, io.netty.buffer.ByteBufAllocator allocator) throws java.lang.Exception
Description copied from interface:BookieProtoEncoding.EnDecoder
Encode a object into channel buffer.- Specified by:
encode
in interfaceBookieProtoEncoding.EnDecoder
- Parameters:
msg
- object.- Returns:
- encode buffer.
- Throws:
java.lang.Exception
-
decode
public java.lang.Object decode(io.netty.buffer.ByteBuf packet) throws java.lang.Exception
Description copied from interface:BookieProtoEncoding.EnDecoder
Decode a packet into an object.- Specified by:
decode
in interfaceBookieProtoEncoding.EnDecoder
- Parameters:
packet
- received packet.- Returns:
- parsed object.
- Throws:
java.lang.Exception
-
-