@Test public void testClose() { final GrpcClientImpl grpcClient = new GrpcClientImpl(); grpcClient.close(); }
@Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } }
GrpcClientImpl implements GrpcClient, Closeable { @Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } } }
GrpcClientImpl implements GrpcClient, Closeable { @Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } } GrpcClientImpl(); }
GrpcClientImpl implements GrpcClient, Closeable { @Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } } GrpcClientImpl(); AergoRPCServiceBlockingStub getBlockingStub(); AergoRPCServiceFutureStub getFutureStub(); AergoRPCServiceStub getStreamStub(); @Override void close(); @Override String toString(); }
GrpcClientImpl implements GrpcClient, Closeable { @Override public void close() { try { if (null != this.channel) { this.channel.shutdown().awaitTermination(3, TimeUnit.SECONDS); } } catch (Throwable e) { logger.debug("Fail to close grpc client by {}", e.toString()); throw new HerajException(e); } } GrpcClientImpl(); AergoRPCServiceBlockingStub getBlockingStub(); AergoRPCServiceFutureStub getFutureStub(); AergoRPCServiceStub getStreamStub(); @Override void close(); @Override String toString();  }