crowdUser
Class CrowdSentinel

java.lang.Object
  extended by crowdUser.CrowdSentinel

public class CrowdSentinel
extends java.lang.Object

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.

Author:
Leo Perrin (perrin.leo@gmail.com)

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

port

private java.lang.Integer port
The port on which the webhook will be sent.

Constructor Detail

CrowdSentinel

public CrowdSentinel(java.lang.Integer p)
Creates a CrowdSentinel instance listening on the 'p' port. This method is a STUB.

Parameters:
p - The port used by CrowdFlower to send webhooks.
Method Detail

wait4webhook

public java.lang.Integer wait4webhook(java.lang.Integer iteration)
Blocks the execution of the thread until CrowdFlower posts a webhook. This method is a STUB.