@Test public void cancel() throws Exception { mStream.cancel(); assertTrue(mStream.isCanceled()); assertFalse(mStream.isOpen()); verify(mRequestObserver).cancel(any(String.class), eq(null)); }
public void cancel() { if (isOpen()) { LOG.debug("Cancelling stream ({})", mDescription); mCanceled = true; mRequestObserver.cancel("Request is cancelled by user.", null); } }
GrpcBlockingStream { public void cancel() { if (isOpen()) { LOG.debug("Cancelling stream ({})", mDescription); mCanceled = true; mRequestObserver.cancel("Request is cancelled by user.", null); } } }
GrpcBlockingStream { public void cancel() { if (isOpen()) { LOG.debug("Cancelling stream ({})", mDescription); mCanceled = true; mRequestObserver.cancel("Request is cancelled by user.", null); } } GrpcBlockingStream(Function<StreamObserver<ResT>, StreamObserver<ReqT>> rpcFunc,
      int bufferSize, String description); }
GrpcBlockingStream { public void cancel() { if (isOpen()) { LOG.debug("Cancelling stream ({})", mDescription); mCanceled = true; mRequestObserver.cancel("Request is cancelled by user.", null); } } GrpcBlockingStream(Function<StreamObserver<ResT>, StreamObserver<ReqT>> rpcFunc,
      int bufferSize, String description); void send(ReqT request, long timeoutMs); void send(ReqT request); ResT receive(long timeoutMs); void close(); void cancel(); void waitForComplete(long timeoutMs); boolean isClosedFromRemote(); boolean isOpen(); boolean isClosed(); boolean isCanceled(); }
GrpcBlockingStream { public void cancel() { if (isOpen()) { LOG.debug("Cancelling stream ({})", mDescription); mCanceled = true; mRequestObserver.cancel("Request is cancelled by user.", null); } } GrpcBlockingStream(Function<StreamObserver<ResT>, StreamObserver<ReqT>> rpcFunc,
      int bufferSize, String description); void send(ReqT request, long timeoutMs); void send(ReqT request); ResT receive(long timeoutMs); void close(); void cancel(); void waitForComplete(long timeoutMs); boolean isClosedFromRemote(); boolean isOpen(); boolean isClosed(); boolean isCanceled();  }