Class RestMasterWebService

java.lang.Object
io.vertigo.stella.plugins.work.rest.master.RestMasterWebService
All Implemented Interfaces:
io.vertigo.core.node.component.Component, io.vertigo.core.node.component.CoreComponent, io.vertigo.vega.webservice.WebServices

@PathPrefix("/backend/workQueue") public final class RestMasterWebService extends Object implements io.vertigo.vega.webservice.WebServices
Exécution synchrone et distante des Works avec un transfert par WS REST.
Author:
npiedeloup, pchretien
  • Constructor Details

    • RestMasterWebService

      @Inject public RestMasterWebService(MasterPlugin masterPlugin)
      Constructor.
      Parameters:
      masterPlugin - RestMasterPlugin
  • Method Details

    • pollWork

      @SessionLess @AnonymousAccessAllowed @GET("/pollWork/{workType}") public String[] pollWork(@PathParam("workType") String workType, @QueryParam("nodeUID") String nodeUID)
      Parameters:
      workType - Work type name
      nodeUID - node uid
      Returns:
      Work todo or empty array
    • onStart

      @SessionLess @AnonymousAccessAllowed @POST("/event/start/{uuid}") public void onStart(@PathParam("uuid") String uuid)
      Node marks work as started.
      Parameters:
      uuid - work uuid
    • onSuccess

      @SessionLess @AnonymousAccessAllowed @POST("/event/success/{uuid}") public void onSuccess(@PathParam("uuid") String uuid, String base64Result)
      Node marks work as success.
      Parameters:
      uuid - work uuid
      base64Result - result serialized/compressed in base64
    • onFailure

      @SessionLess @AnonymousAccessAllowed @POST("/event/failure/{uuid}") public void onFailure(@PathParam("uuid") String uuid, String base64Result)
      Node marks work as failur.
      Parameters:
      uuid - work uuid
      base64Result - exception serialized/compressed in base64
    • getApiVersion

      @SessionLess @AnonymousAccessAllowed @GET("/version") public String getApiVersion()
      Returns:
      Api version