Class ProcessDistributorResource


  • @Path("/processing/v1/worker_family")
    public class ProcessDistributorResource
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response registerWorker​(javax.ws.rs.core.HttpHeaders headers, java.lang.String idFamily, java.lang.String idWorker, WorkerBean workerInformation)
      Register a new worker
      javax.ws.rs.core.Response unregisterWorker​(javax.ws.rs.core.HttpHeaders headers, java.lang.String idFamily, java.lang.String idWorker)
      Unregister a specific worker family
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProcessDistributorResource

        public ProcessDistributorResource​(IWorkerManager workerManager)
        Constructor
        Parameters:
        workerManager - a WorkerManager instance
    • Method Detail

      • registerWorker

        @Path("/{id_family}/workers/{id_worker}")
        @POST
        @Produces("application/json")
        @Consumes("application/json")
        public javax.ws.rs.core.Response registerWorker​(@Context
                                                        javax.ws.rs.core.HttpHeaders headers,
                                                        @PathParam("id_family")
                                                        java.lang.String idFamily,
                                                        @PathParam("id_worker")
                                                        java.lang.String idWorker,
                                                        WorkerBean workerInformation)
        Register a new worker
        Parameters:
        headers - http header
        idFamily - the id of the family
        idWorker - the id of the worker
        workerInformation - information describing the worker to be registered
        Returns:
        Response the status of the registering
      • unregisterWorker

        @Path("/{id_family}/workers/{id_worker}")
        @DELETE
        @Produces("application/json")
        public javax.ws.rs.core.Response unregisterWorker​(@Context
                                                          javax.ws.rs.core.HttpHeaders headers,
                                                          @PathParam("id_family")
                                                          java.lang.String idFamily,
                                                          @PathParam("id_worker")
                                                          java.lang.String idWorker)
        Unregister a specific worker family
        Parameters:
        headers - http header
        idFamily - the id of the family
        idWorker - the id of the worker
        Returns:
        Response the status of the unregistering