Class MyBrokerEndpoint

java.lang.Object
org.aktin.broker.rest.AbstractRequestEndpoint
org.aktin.broker.rest.MyBrokerEndpoint

@Path("/broker/my/")
public class MyBrokerEndpoint
extends AbstractRequestEndpoint
Endpoint accessed by nodes to work with their (my) data.
Author:
R.W.Majeed
  • Constructor Details

    • MyBrokerEndpoint

      public MyBrokerEndpoint()
  • Method Details

    • setNodesResource

      @PUT @Path("node/{resource}") public void setNodesResource​(@PathParam("resource") String resourceId, @Context javax.ws.rs.core.HttpHeaders headers, @Context javax.ws.rs.core.SecurityContext sec, InputStream content)
      Upload node resources to the broker
      Parameters:
      resourceId - resource id
      headers - HTTP headers. Used to retrieve media type
      sec - security context
      content - resource content to store
    • getOwnNodeInfo

      @GET @Path("node") @Produces("application/xml") public Node getOwnNodeInfo​(@Context javax.ws.rs.core.SecurityContext sec)
    • listNodesRequests

      @GET @Path("request") @Produces("application/xml") public RequestList listNodesRequests​(@Context javax.ws.rs.core.SecurityContext sec)
    • getNodesRequestInfo

      @OPTIONS @Path("request/{id}") public RequestInfo getNodesRequestInfo​(@PathParam("id") Integer requestId, @Context javax.ws.rs.core.SecurityContext sec, @Context javax.ws.rs.core.HttpHeaders headers) throws SQLException, IOException
      Throws:
      SQLException
      IOException
    • getNodesRequest

      @GET @Path("request/{id}") public javax.ws.rs.core.Response getNodesRequest​(@PathParam("id") Integer requestId, @Context javax.ws.rs.core.SecurityContext sec, @Context javax.ws.rs.core.HttpHeaders headers) throws SQLException, IOException
      Throws:
      SQLException
      IOException
    • putNodesRequestError

      @POST @Path("request/{id}/status/{status}") public javax.ws.rs.core.Response putNodesRequestError​(@PathParam("id") Integer requestId, @PathParam("status") RequestStatus status, @Context javax.ws.rs.core.SecurityContext sec, @Context javax.ws.rs.core.HttpHeaders headers, Reader content)
      Status report by a node for it's request.
      Parameters:
      requestId - request to which the status belongs
      status - reported status a request via deleteNodesRequest(String, SecurityContext).
      sec - security context
      headers - request headers. Use the Date header to specify a timestamp for the status. If Date is not specified, the current time is used.
      content - status message. Use the Content-Type header to specify a media type. only character content is allowed (including XML/JSON).
      Returns:
      no content on success. Server error otherwise.
    • deleteNodesRequest

      @DELETE @Path("request/{id}") public void deleteNodesRequest​(@PathParam("id") String requestId, @Context javax.ws.rs.core.SecurityContext sec)
    • getTypeManager

      protected RequestTypeManager getTypeManager()
      Specified by:
      getTypeManager in class AbstractRequestEndpoint
    • getBroker

      protected BrokerBackend getBroker()
      Specified by:
      getBroker in class AbstractRequestEndpoint