Class StreamRecorder<T>

    • Method Detail

      • create

        public static <T> StreamRecorder<T> create()
        Deprecated.
        Creates a new recorder.
      • onNext

        public void onNext​(T value)
        Deprecated.
        Description copied from interface: StreamObserver
        Receives a value from the stream.

        Can be called many times but is never called after StreamObserver.onError(Throwable) or StreamObserver.onCompleted() are called.

        Unary calls must invoke onNext at most once. Clients may invoke onNext at most once for server streaming calls, but may receive many onNext callbacks. Servers may invoke onNext at most once for client streaming calls, but may receive many onNext callbacks.

        If an exception is thrown by an implementation the caller is expected to terminate the stream by calling StreamObserver.onError(Throwable) with the caught exception prior to propagating it.

        Specified by:
        onNext in interface StreamObserver<T>
        Parameters:
        value - the value passed to the stream
      • onCompleted

        public void onCompleted()
        Deprecated.
        Description copied from interface: StreamObserver
        Receives a notification of successful stream completion.

        May only be called once and if called it must be the last method called. In particular if an exception is thrown by an implementation of onCompleted no further calls to any method are allowed.

        Specified by:
        onCompleted in interface StreamObserver<T>
      • awaitCompletion

        public void awaitCompletion()
                             throws Exception
        Deprecated.
        Waits for the stream to terminate.
        Throws:
        Exception
      • awaitCompletion

        public boolean awaitCompletion​(int timeout,
                                       TimeUnit unit)
                                throws Exception
        Deprecated.
        Waits a fixed timeout for the stream to terminate.
        Throws:
        Exception
      • getValues

        public List<T> getValues()
        Deprecated.
        Returns the current set of received values.
      • getError

        @Nullable
        public Throwable getError()
        Deprecated.
        Returns the stream terminating error.
      • firstValue

        public com.google.common.util.concurrent.ListenableFuture<T> firstValue()
        Deprecated.
        Returns a ListenableFuture for the first value received from the stream. Useful for testing unary call patterns.