/** * Writes a value for the given key to Consul. * * @param key The key * @param value The value as a String * @return A {@link Publisher} that emits a boolean if the operation succeeded */ @Put(value = "/kv/{+key}", processes = MediaType.TEXT_PLAIN, single = true) Publisher<Boolean> putValue(String key, @Body String value);
/** * Returns the members the agent sees in the cluster gossip pool. * * @return the {@link MemberEntry} instances */ @Get(uri = "/agent/members", single = true) Publisher<List<MemberEntry>> getMembers();
@Get("/simple") String simple(@QueryValue Integer max) { return "Parameter Value: " + max; }
@Get("/bar/{bar}") public Bar bar(@PathVariable(name = "bar") Bar bar) { return bar; }
@Get("/{storyId}") Single<Story> getById(@RequestAttribute String storyId); }
/** * @author Graeme Rocher * @since 1.0 */ @Controller("/secure") public class SecureController { @Get public HttpResponse index(String username) { return HttpResponse.ok("Authenticated: " + username); } }
/** * Gets all of the registered nodes. * * @return All the nodes */ @Get(uri = "/catalog/nodes", single = true) Publisher<List<CatalogEntry>> getNodes();
@Get("/named") String named(@QueryValue("maximum") Integer max) { return "Parameter Value: " + max; }
@Get("/foo/{foo}") public Foo foo(@PathVariable(name = "foo") Foo foo) { return foo; }
/** * @return The current leader address */ @Get(uri = "/status/leader", single = true) Publisher<String> status();
@Get("/{number}") String issue(Integer number) { return appPrefix + ": issue # " + number + "!"; } }