class LengthPrefixedEncoding implements RpcEncoding {

  @Override
  public <T> RpcByteBufDecoder<T> createDecoder(Class<T> payloadType) {
    if (payloadType.equals(EmptyMessage.class)) {
      return getEmptyMessageDecoder();
    } else {
      return new LengthPrefixedPayloadDecoder<>(
          payloadEncoders.getEncoder(payloadType), compressor);
    }
  }

    LengthPrefixedEncoding(
      final String name, final RpcPayloadEncoders payloadEncoders, final Compressor compressor);

}