@Path(value="/routers") @PermitAll public class Routers extends Object
Constructor and Description |
---|
Routers() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
buildGraphOverWire(String routerId,
boolean preEvict,
InputStream input)
Build a graph from data in the ZIP file posted over the wire, associating it with the given router ID.
|
javax.ws.rs.core.Response |
deleteAll()
De-register all registered routerIds, evicting them from memory.
|
javax.ws.rs.core.Response |
deleteGraphId(String routerId)
De-register a specific routerId, evicting the associated graph from memory.
|
RouterInfo |
getGraphId(String routerId)
Returns the bounds for a specific routerId, or verifies whether it is registered.
|
RouterList |
getRouterIds()
Returns a list of routers and their bounds.
|
javax.ws.rs.core.Response |
postGraphOverWire(String routerId,
boolean preEvict,
InputStream is)
Deserialize a graph sent with the HTTP request as POST data, associating it with the given
routerId.
|
javax.ws.rs.core.Response |
putGraphId(String routerId,
boolean preEvict)
Load the graph for the specified routerId from disk.
|
javax.ws.rs.core.Response |
reloadGraphs(String path,
boolean preEvict,
boolean force)
Reload the graphs for all registered routerIds from disk.
|
javax.ws.rs.core.Response |
saveGraphOverWire(String routerId,
InputStream is)
Save the graph data, but don't load it in memory.
|
@GET @Produces(value={"application/json","application/xml;qs=0.5","text/xml;qs=0.5"}) public RouterList getRouterIds()
@GET @Path(value="{routerId}") @Produces(value={"application/json","application/xml;qs=0.5","text/xml;qs=0.5"}) public RouterInfo getGraphId(@PathParam(value="routerId") String routerId)
@RolesAllowed(value="ROUTERS") @PUT @Produces(value="application/json") public javax.ws.rs.core.Response reloadGraphs(@QueryParam(value="path") String path, @QueryParam(value="preEvict") @DefaultValue(value="true") boolean preEvict, @QueryParam(value="force") @DefaultValue(value="true") boolean force)
@RolesAllowed(value="ROUTERS") @PUT @Path(value="{routerId}") @Produces(value="text/plain") public javax.ws.rs.core.Response putGraphId(@PathParam(value="routerId") String routerId, @QueryParam(value="preEvict") @DefaultValue(value="true") boolean preEvict)
preEvict
- before reloading each graph, evict the existing graph. This will prevent
memory usage from increasing during the reload, but routing will be unavailable on this
routerId for the duration of the operation.@RolesAllowed(value="ROUTERS") @POST @Path(value="{routerId}") @Produces(value="text/plain") @Consumes(value="application/octet-stream") public javax.ws.rs.core.Response postGraphOverWire(@PathParam(value="routerId") String routerId, @QueryParam(value="preEvict") @DefaultValue(value="true") boolean preEvict, InputStream is)
@RolesAllowed(value="ROUTERS") @POST @Path(value="{routerId}") @Consumes(value="application/zip") @Produces(value="text/plain") public javax.ws.rs.core.Response buildGraphOverWire(@PathParam(value="routerId") String routerId, @QueryParam(value="preEvict") @DefaultValue(value="true") boolean preEvict, InputStream input)
@RolesAllowed(value="ROUTERS") @POST @Path(value="/save") @Produces(value="text/plain") @Consumes(value="application/octet-stream") public javax.ws.rs.core.Response saveGraphOverWire(@QueryParam(value="routerId") String routerId, InputStream is)
@RolesAllowed(value="ROUTERS") @DELETE @Produces(value="text/plain") public javax.ws.rs.core.Response deleteAll()
@RolesAllowed(value="ROUTERS") @DELETE @Path(value="{routerId}") @Produces(value="text/plain") public javax.ws.rs.core.Response deleteGraphId(@PathParam(value="routerId") String routerId)
Copyright © 2019. All rights reserved.