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
,WebServices
@PathPrefix("/backend/workQueue") public final class RestMasterWebService extends Object implements WebServices
Exécution synchrone et distante des Works avec un transfert par WS REST.- Author:
- npiedeloup, pchretien
-
-
Constructor Summary
Constructors Constructor Description RestMasterWebService(MasterPlugin masterPlugin)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getApiVersion()
void
onFailure(String uuid, String base64Result)
Node marks work as failur.void
onStart(String uuid)
Node marks work as started.void
onSuccess(String uuid, String base64Result)
Node marks work as success.String[]
pollWork(String workType, String nodeUID)
-
-
-
Constructor Detail
-
RestMasterWebService
@Inject public RestMasterWebService(MasterPlugin masterPlugin)
Constructor.- Parameters:
masterPlugin
- RestMasterPlugin
-
-
Method Detail
-
pollWork
@SessionLess @AnonymousAccessAllowed @GET("/pollWork/{workType}") public String[] pollWork(@PathParam("workType") String workType, @QueryParam("nodeUID") String nodeUID)
- Parameters:
workType
- Work type namenodeUID
- 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 uuidbase64Result
- 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 uuidbase64Result
- exception serialized/compressed in base64
-
getApiVersion
@SessionLess @AnonymousAccessAllowed @GET("/version") public String getApiVersion()
- Returns:
- Api version
-
-