@Path(value="/v2/hosts/") public class HostsHandler extends AbstractRestDbHandler
AbstractRestDbHandler
handling all requests made on the
host collection REST entry
point.crud
Constructor and Description |
---|
HostsHandler(byte crud)
Initializes the handler with the given CRUD mask.
|
Modifier and Type | Method and Description |
---|---|
void |
addHost(io.netty.handler.codec.http.HttpRequest request,
io.cdap.http.HttpResponder responder)
Method called to add a new host authentication entry to the server
database.
|
void |
filterHosts(io.netty.handler.codec.http.HttpRequest request,
io.cdap.http.HttpResponder responder,
String limit_str,
String offset_str,
String order_str,
String address,
String isSSL_str,
String isActive_str)
Method called to get a list of host entries from the server's database,
with optional filters applied.
|
void |
options(io.netty.handler.codec.http.HttpRequest request,
io.cdap.http.HttpResponder responder)
Method called to get a list of all allowed HTTP methods on this entry
point.
|
checkCRUD
public HostsHandler(byte crud)
crud
- the CRUD mask for this handler@GET @Consumes(value="application/x-www-form-urlencoded") public void filterHosts(io.netty.handler.codec.http.HttpRequest request, io.cdap.http.HttpResponder responder, @QueryParam(value="limit") @DefaultValue(value="20") String limit_str, @QueryParam(value="offset") @DefaultValue(value="0") String offset_str, @QueryParam(value="order") @DefaultValue(value="ascId") String order_str, @QueryParam(value="address") String address, @QueryParam(value="isSSL") String isSSL_str, @QueryParam(value="isActive") String isActive_str)
request
- The HttpRequest
made on the resource.responder
- The HttpResponder
which sends the reply
to the request.limit_str
- HTTP query parameter, maximum number of entries
allowed in the response.offset_str
- HTTP query parameter, index of the first
accepted entry in the list of all valid
answers.order_str
- HTTP query parameter, the criteria used to sort
the entries and the way of ordering.address
- HTTP query parameter, filter only hosts with this
address.isSSL_str
- HTTP query parameter, filter only hosts that use
SSL, or those that don't. Leave empty
to get both.isActive_str
- HTTP query parameter, filter hosts that are
active, or those that aren't. Leave empty
to get both.@POST @Consumes(value="application/json") public void addHost(io.netty.handler.codec.http.HttpRequest request, io.cdap.http.HttpResponder responder)
request
- The HttpRequest
made on the resource.responder
- The HttpResponder
which sends the reply
to the request.@OPTIONS @Consumes(value="*/*") public void options(io.netty.handler.codec.http.HttpRequest request, io.cdap.http.HttpResponder responder)
request
- The HttpRequest
made on the resource.responder
- The HttpResponder
which sends the reply
to the request.Copyright © 2009–2020 Waarp. All rights reserved.