Interface Deframer

All Known Subinterfaces:
ThreadOptimizedDeframer
All Known Implementing Classes:
ApplicationThreadDeframer, MessageDeframer

public interface Deframer
Interface for deframing gRPC messages.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this deframer and frees any resources.
    void
    Close when any messages currently queued have been requested and delivered.
    void
    Adds the given data to this deframer and attempts delivery to the listener.
    void
    request(int numMessages)
    Requests up to the given number of messages from the call.
    void
    Sets the decompressor available to use.
    void
    setFullStreamDecompressor(io.grpc.internal.GzipInflatingBuffer fullStreamDecompressor)
    Sets the decompressor used for full-stream decompression.
    void
    setMaxInboundMessageSize(int messageSize)
     
  • Method Details

    • setMaxInboundMessageSize

      void setMaxInboundMessageSize(int messageSize)
    • setDecompressor

      void setDecompressor(Decompressor decompressor)
      Sets the decompressor available to use. The message encoding for the stream comes later in time, and thus will not be available at the time of construction. This should only be set once, since the compression codec cannot change after the headers have been sent.
      Parameters:
      decompressor - the decompressing wrapper.
    • setFullStreamDecompressor

      void setFullStreamDecompressor(io.grpc.internal.GzipInflatingBuffer fullStreamDecompressor)
      Sets the decompressor used for full-stream decompression. Full-stream decompression disables any per-message decompressor set by setDecompressor(io.grpc.Decompressor).
      Parameters:
      fullStreamDecompressor - the decompressing wrapper
    • request

      void request(int numMessages)
      Requests up to the given number of messages from the call. No additional messages will be delivered.

      If close() has been called, this method will have no effect.

      Parameters:
      numMessages - the requested number of messages to be delivered to the listener.
    • deframe

      void deframe(ReadableBuffer data)
      Adds the given data to this deframer and attempts delivery to the listener.
      Parameters:
      data - the raw data read from the remote endpoint. Must be non-null.
    • closeWhenComplete

      void closeWhenComplete()
      Close when any messages currently queued have been requested and delivered.
    • close

      void close()
      Closes this deframer and frees any resources. After this method is called, additional calls will have no effect.