@Test public void onUpdate() { List<SubscriptionQueryResponse> messages = new LinkedList<>(); DirectUpdateHandler directUpdateHandler = new DirectUpdateHandler(messages::add); QueryUpdate update = QueryUpdate.newBuilder().build(); SubscriptionQueryResponse response = SubscriptionQueryResponse.newBuilder().setUpdate(update).build(); directUpdateHandler.onSubscriptionQueryResponse(response); assertEquals(1, messages.size()); assertEquals(update, messages.get(0).getUpdate()); }
@Override public void onSubscriptionQueryResponse(SubscriptionQueryResponse response) { logger.debug("SubscriptionQueryResponse for subscription Id {} send to client.", response.getSubscriptionIdentifier()); destination.publish(response); }
DirectUpdateHandler implements UpdateHandler { @Override public void onSubscriptionQueryResponse(SubscriptionQueryResponse response) { logger.debug("SubscriptionQueryResponse for subscription Id {} send to client.", response.getSubscriptionIdentifier()); destination.publish(response); } }
DirectUpdateHandler implements UpdateHandler { @Override public void onSubscriptionQueryResponse(SubscriptionQueryResponse response) { logger.debug("SubscriptionQueryResponse for subscription Id {} send to client.", response.getSubscriptionIdentifier()); destination.publish(response); } DirectUpdateHandler(Publisher<SubscriptionQueryResponse> destination); }
DirectUpdateHandler implements UpdateHandler { @Override public void onSubscriptionQueryResponse(SubscriptionQueryResponse response) { logger.debug("SubscriptionQueryResponse for subscription Id {} send to client.", response.getSubscriptionIdentifier()); destination.publish(response); } DirectUpdateHandler(Publisher<SubscriptionQueryResponse> destination); @Override void onSubscriptionQueryResponse(SubscriptionQueryResponse response); }
DirectUpdateHandler implements UpdateHandler { @Override public void onSubscriptionQueryResponse(SubscriptionQueryResponse response) { logger.debug("SubscriptionQueryResponse for subscription Id {} send to client.", response.getSubscriptionIdentifier()); destination.publish(response); } DirectUpdateHandler(Publisher<SubscriptionQueryResponse> destination); @Override void onSubscriptionQueryResponse(SubscriptionQueryResponse response);  }