Skip to content

Commit

Permalink
java doc onReady
Browse files Browse the repository at this point in the history
  • Loading branch information
YifeiZhuang committed Jan 16, 2024
1 parent de04327 commit 6144f1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 3 additions & 4 deletions xds/src/main/java/io/grpc/xds/XdsTransportFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ interface StreamingCall<ReqT, RespT> {
interface EventHandler<RespT> {

/**
* Called when the stream is ready to send additional messages. It can be used to set up timer
* that notify resource absent on resources watchers when initial resource update does not
* arrive before a timeout(15s), also see {@link StreamingCall#isReady()}. Application is free
* to ignore it.
* Called when the stream is ready to send additional messages. If called the library use this
* handler to trigger resource arrival timeout, also see {@link StreamingCall#isReady()}.
* Application is free to ignore it.
*/
void onReady();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class GrpcXdsTransportFactoryTest {
private Server server;

@Before
public void setup() throws Exception{
public void setup() throws Exception {
server = Grpc.newServerBuilderForPort(0, InsecureServerCredentials.create())
.addService(echoAdsService())
.build()
Expand Down Expand Up @@ -115,7 +115,8 @@ public void callApis() throws Exception {
xdsTransport.shutdown();
}

private static class FakeEventHandler implements XdsTransportFactory.EventHandler<DiscoveryResponse> {
private static class FakeEventHandler implements
XdsTransportFactory.EventHandler<DiscoveryResponse> {
private final BlockingQueue<DiscoveryResponse> respQ = new LinkedBlockingQueue<>();
private SettableFuture<Status> endFuture = SettableFuture.create();
private SettableFuture<Boolean> ready = SettableFuture.create();
Expand Down

0 comments on commit 6144f1a

Please sign in to comment.