Interface Deframer

    • Method Detail

      • 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​(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.