Class AbstractClientStream

    • Field Detail

      • log

        private static final java.util.logging.Logger log
      • framer

        private final Framer framer
      • shouldBeCountedForInUse

        private final boolean shouldBeCountedForInUse
      • useGet

        private final boolean useGet
      • cancelled

        private volatile boolean cancelled
        Whether cancel() has been called. This is not strictly necessary, but removes the delay between cancel() being called and isReady() beginning to return false, since cancel is commonly processed asynchronously.
    • Method Detail

      • setMaxOutboundMessageSize

        public void setMaxOutboundMessageSize​(int maxSize)
        Description copied from interface: ClientStream
        Sets the max size sent to the remote endpoint.
        Specified by:
        setMaxOutboundMessageSize in interface ClientStream
      • setMaxInboundMessageSize

        public void setMaxInboundMessageSize​(int maxSize)
        Description copied from interface: ClientStream
        Sets the max size accepted from the remote endpoint.
        Specified by:
        setMaxInboundMessageSize in interface ClientStream
      • setFullStreamDecompression

        public final void setFullStreamDecompression​(boolean fullStreamDecompression)
        Description copied from interface: ClientStream
        Enables full-stream decompression, allowing the client stream to use GzipInflatingBuffer to decode inbound GZIP compressed streams.
        Specified by:
        setFullStreamDecompression in interface ClientStream
      • abstractClientStreamSink

        protected abstract AbstractClientStream.Sink abstractClientStreamSink()
        Sink for transport to be called to perform outbound operations. Each stream must have its own unique sink.
      • shouldBeCountedForInUse

        public final boolean shouldBeCountedForInUse()
        Returns true if this stream should be counted when determining the in-use state of the transport.
      • deliverFrame

        public final void deliverFrame​(WritableBuffer frame,
                                       boolean endOfStream,
                                       boolean flush,
                                       int numMessages)
        Description copied from interface: MessageFramer.Sink
        Delivers a frame via the transport.
        Specified by:
        deliverFrame in interface MessageFramer.Sink
        Parameters:
        frame - a non-empty buffer to deliver or null if the framer is being closed and there is no data to deliver.
        endOfStream - whether the frame is the last one for the GRPC stream
        flush - true if more data may not be arriving soon
        numMessages - the number of messages that this series of frames represents
      • halfClose

        public final void halfClose()
        Description copied from interface: ClientStream
        Closes the local side of this stream and flushes any remaining messages. After this is called, no further messages may be sent on this stream, but additional messages may be received until the remote end-point is closed. This method may only be called once, and only after ClientStream.start(io.grpc.internal.ClientStreamListener).
        Specified by:
        halfClose in interface ClientStream
      • isReady

        public final boolean isReady()
        Description copied from interface: Stream
        If true, indicates that the transport is capable of sending additional messages without requiring excessive buffering internally. Otherwise, StreamListener.onReady() will be called when it turns true.

        This is just a suggestion and the application is free to ignore it, however doing so may result in excessive buffering within the transport.

        Specified by:
        isReady in interface Stream
        Overrides:
        isReady in class AbstractStream
      • appendTimeoutInsight

        public final void appendTimeoutInsight​(InsightBuilder insight)
        Description copied from interface: ClientStream
        Append information that will be included in the locally generated DEADLINE_EXCEEDED errors to the given InsightBuilder, in order to tell the user about the state of the stream so that they can better diagnose the cause of the error.
        Specified by:
        appendTimeoutInsight in interface ClientStream