use of com.navercorp.pinpoint.profiler.sender.grpc.ResponseStreamObserver in project pinpoint by naver.
the class SpanClientMock method newSpanStream.
private StreamObserver<PSpanMessage> newSpanStream() {
System.out.println("### ");
System.out.println("NEW SpanStream");
System.out.println("###");
StreamId spanId = StreamId.newStreamId("SpanStream");
StreamEventListener<PSpanMessage> listener = new StreamEventListener<PSpanMessage>() {
@Override
public void start(ClientCallStreamObserver<PSpanMessage> requestStream) {
spanStreamReconnector.reset();
}
@Override
public void onError(Throwable t) {
spanStreamReconnector.reconnect();
}
@Override
public void onCompleted() {
spanStreamReconnector.reconnect();
}
};
ResponseStreamObserver<PSpanMessage, Empty> responseStreamObserver = new ResponseStreamObserver<PSpanMessage, Empty>(listener);
return spanStub.sendSpan(responseStreamObserver);
}
Aggregations