|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcrowdUser.CrowdSentinel
public class CrowdSentinel
Class CrowdSentinel ; this class's aim is to wait for CrowdFlower to post a webhook.
Webhooks are used by Crowdflower to spot a finished job. When a job is over, CrowdFlower posts (i.e, uses the http method "POST") to an address that is set using their web application. The content of the post is described in CrowdFlower's API documentation.
The wait4webhook method stops the execution of the current thread until a webhook is sent, allowing the program not to use to much resources.
Field Summary | |
---|---|
private java.lang.Integer |
port
The port on which the webhook will be sent. |
Constructor Summary | |
---|---|
CrowdSentinel(java.lang.Integer p)
Creates a CrowdSentinel instance listening on the 'p' port. |
Method Summary | |
---|---|
java.lang.Integer |
wait4webhook(java.lang.Integer iteration)
Blocks the execution of the thread until CrowdFlower posts a webhook. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.Integer port
Constructor Detail |
---|
public CrowdSentinel(java.lang.Integer p)
p
- The port used by CrowdFlower to send webhooks.Method Detail |
---|
public java.lang.Integer wait4webhook(java.lang.Integer iteration)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |