Interface PackableMethod

All Known Implementing Classes:
StubMethodDescriptor

public interface PackableMethod
A packable method is used to customize serialization for methods. It can provide a common wrapper for RESP / Protobuf.
  • Method Details

    • parseRequest

      default Object parseRequest(byte[] data) throws Exception
      Throws:
      Exception
    • parseResponse

      default Object parseResponse(byte[] data) throws Exception
      Throws:
      Exception
    • parseResponse

      default Object parseResponse(byte[] data, boolean isReturnTriException) throws Exception
      Throws:
      Exception
    • packRequest

      default byte[] packRequest(Object request) throws Exception
      Throws:
      Exception
    • packResponse

      default byte[] packResponse(Object response) throws Exception
      Throws:
      Exception
    • needWrapper

      default boolean needWrapper()
    • getRequestPack

      Pack getRequestPack()
    • getResponsePack

      Pack getResponsePack()
    • getResponseUnpack

      UnPack getResponseUnpack()
    • getRequestUnpack

      UnPack getRequestUnpack()