Class NodeResource
- java.lang.Object
-
- uk.co.ractf.polaris.controller.resources.NodeResource
-
@Path("/nodes") @Produces("application/json") public class NodeResource extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NodeResource(ClusterState clusterState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description uk.co.ractf.polaris.api.node.NodeInfo
getHostInfo(java.lang.String id)
GetsNodeInfo
from the host's id.java.util.Map<java.lang.String,uk.co.ractf.polaris.api.node.NodeInfo>
listHostInfo(java.lang.String filter)
Return aMap
of host toNodeInfo
for all hosts matching the host id regex.
-
-
-
Constructor Detail
-
NodeResource
@Inject public NodeResource(ClusterState clusterState)
-
-
Method Detail
-
listHostInfo
@GET @Timed @ExceptionMetered @RolesAllowed("ROOT") public java.util.Map<java.lang.String,uk.co.ractf.polaris.api.node.NodeInfo> listHostInfo(@QueryParam("filter") @DefaultValue("") java.lang.String filter)
Return aMap
of host toNodeInfo
for all hosts matching the host id regex. Results are only filtered if a filter is not omitted.- Parameters:
filter
- The regex to filter host ids by- Returns:
- the matching hosts
-
getHostInfo
@GET @Timed @Path("/{id}") @ExceptionMetered @RolesAllowed("ROOT") public uk.co.ractf.polaris.api.node.NodeInfo getHostInfo(@PathParam("id") java.lang.String id)
GetsNodeInfo
from the host's id.- Parameters:
id
- host id- Returns:
- host info
-
-