Class ArmeriaMessageDeframer

java.lang.Object
com.linecorp.armeria.common.grpc.protocol.AbstractMessageDeframer
com.linecorp.armeria.common.grpc.protocol.ArmeriaMessageDeframer
All Implemented Interfaces:
com.linecorp.armeria.common.stream.HttpDecoder<DeframedMessage>, com.linecorp.armeria.common.stream.StreamDecoder<com.linecorp.armeria.common.HttpData,DeframedMessage>

@UnstableApi public class ArmeriaMessageDeframer extends AbstractMessageDeframer implements com.linecorp.armeria.common.stream.HttpDecoder<DeframedMessage>
A deframer of messages transported in the gRPC wire format. See gRPC Wire Format for more detail on the protocol.

The logic has been mostly copied from io.grpc.internal.MessageDeframer, while removing the buffer abstraction in favor of using ByteBuf directly, and allowing the delivery of uncompressed frames as a ByteBuf to optimize message parsing.

  • Constructor Details

    • ArmeriaMessageDeframer

      public ArmeriaMessageDeframer(int maxMessageLength)
      Construct an ArmeriaMessageDeframer for reading messages out of a gRPC request or response.
    • ArmeriaMessageDeframer

      public ArmeriaMessageDeframer(int maxMessageLength, ByteBufAllocator alloc, boolean grpcWebText)
      Construct an ArmeriaMessageDeframer for reading messages out of a gRPC request or response with the specified parameters.
  • Method Details