/** * Checks in with Consul. * * @param checkId The Check ID to check in. * @param state The current state of the Check. * @param note Any note to associate with the Check. */ public void check(String checkId, State state, String note) throws NotRegisteredException { try { Map<String, String> query = note == null ? Collections.emptyMap() : ImmutableMap.of("note", note); http.handle(api.check(state.getPath(), checkId, query)); } catch (Exception ex) { throw new NotRegisteredException("Error checking state", ex); } }