com.google.cloud.bigtable.grpc.scanner
Class StreamObserverAdapter<T>
- java.lang.Object
-
- io.grpc.ClientCall.Listener<T>
-
- com.google.cloud.bigtable.grpc.scanner.StreamObserverAdapter<T>
-
public class StreamObserverAdapter<T> extends io.grpc.ClientCall.Listener<T>
Adapts aStreamObserver
to aClientCall.Listener
.ClientCall.request(int)
will be called onNext.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Constructor Summary
Constructors Constructor and Description StreamObserverAdapter(io.grpc.ClientCall<?,T> call, io.grpc.stub.StreamObserver<T> observer)
Constructor for StreamObserverAdapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
hasStatusBeenRecieved()
void
onClose(io.grpc.Status status, io.grpc.Metadata trailers)
void
onMessage(T message)
-
-
-
Method Detail
-
onMessage
public void onMessage(T message)
- Overrides:
onMessage
in classio.grpc.ClientCall.Listener<T>
-
onClose
public void onClose(io.grpc.Status status, io.grpc.Metadata trailers)
- Overrides:
onClose
in classio.grpc.ClientCall.Listener<T>
-
hasStatusBeenRecieved
public boolean hasStatusBeenRecieved()
- Returns:
- true if
onClose(Status, Metadata)
was called.
-
-