Package org.aktin.broker.rest
Class NodeInfoEndpoint
java.lang.Object
org.aktin.broker.rest.NodeInfoEndpoint
@Path("/broker/node/")
public class NodeInfoEndpoint
extends Object
-
Constructor Summary
Constructors Constructor Description NodeInfoEndpoint() -
Method Summary
Modifier and Type Method Description javax.ws.rs.core.ResponseallNodes()Retrieve a list of registered nodes with the broker.NodegetNodeInfo(int nodeId)Retrieve information about a single node.javax.ws.rs.core.ResponsegetNodeResource(int nodeId, String resourceId)Retrieve a named resource uploaded previously by the specified node.
-
Constructor Details
-
NodeInfoEndpoint
public NodeInfoEndpoint()
-
-
Method Details
-
allNodes
@GET @Produces("application/xml") public javax.ws.rs.core.Response allNodes()Retrieve a list of registered nodes with the broker.- Returns:
- JSON list of nodes
-
getNodeInfo
@GET @Path("{id}") @Produces("application/xml") public Node getNodeInfo(@PathParam("id") int nodeId)Retrieve information about a single node.- Parameters:
nodeId- node id- Returns:
- status
200with node info or status404if not found.
-
getNodeResource
@GET @Path("{node}/{resource}") public javax.ws.rs.core.Response getNodeResource(@PathParam("node") int nodeId, @PathParam("resource") String resourceId) throws SQLExceptionRetrieve a named resource uploaded previously by the specified node.Last modified and eTag headers will be set. The eTag is calculated
url-safe-base64(sha-256(data)).- Parameters:
nodeId- node idresourceId- resource id- Returns:
- status
200with node info or status404if not found. - Throws:
SQLException- sql error
-