public final class RestWorkersPlugin extends Object implements WorkersPlugin
| Constructor and Description |
|---|
RestWorkersPlugin(String serverUrl,
int timeoutSeconds,
io.vertigo.commons.codec.CodecManager codecManager)
Constructeur.
|
| Modifier and Type | Method and Description |
|---|---|
<WR,W> WorkItem<WR,W> |
pollWorkItem(String nodeId,
String workType)
Polling workitem.
|
<R> void |
putResult(String workId,
R result,
Throwable error)
Send result or error if execution failed
|
void |
putStart(String workId) |
@Inject public RestWorkersPlugin(String serverUrl, int timeoutSeconds, io.vertigo.commons.codec.CodecManager codecManager)
serverUrl - Url du serveurtimeoutSeconds - Timeout en seconde des connections vers le serveur (doit être > au timeoutSeconds du serveur)codecManager - Manager d'encodage/decodagepublic <WR,W> WorkItem<WR,W> pollWorkItem(String nodeId, String workType)
pollWorkItem in interface WorkersPluginWR - resultW - workworkType - Type de tachepublic <R> void putResult(String workId, R result, Throwable error)
putResult in interface WorkersPluginR - resultworkId - WorkIdresult - Result (not null if execution succeeded)error - Error ( not null if execution failed)public void putStart(String workId)
putStart in interface WorkersPluginCopyright © 2019. All Rights Reserved.