public class DataSiftPush extends DataSiftApiClient
| Modifier and Type | Field and Description |
|---|---|
String |
CREATE |
String |
DELETE |
String |
GET |
String |
LOG |
String |
PAUSE |
String |
PULL |
String |
RESUME |
String |
STOP |
String |
UPDATE |
String |
VALIDATE |
config| Constructor and Description |
|---|
DataSiftPush(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
<T extends PushConnector> |
create(T connector,
FutureData<PreparedHistoricsQuery> historics,
FutureData<Stream> stream,
String name) |
<T extends PushConnector> |
create(T connector,
FutureData<PreparedHistoricsQuery> historics,
FutureData<Stream> stream,
String name,
Status initialStatus,
long start,
long end)
Creates a push subscription to either a historics query OR a live stream.
|
<T extends PushConnector> |
create(T con,
FutureData<PreparedHistoricsQuery> query,
String name) |
<T extends PushConnector> |
create(T connector,
PreparedHistoricsQuery historics,
String name,
Status initialStatus,
long start,
long end)
Create a push subscription from a prepared query
|
<T extends PushConnector> |
create(T con,
Stream stream,
String name) |
<T extends PushConnector> |
create(T connector,
Stream stream,
String name,
Status initialStatus,
long start,
long end)
Create a push subscription from a live stream
|
FutureData<PushSubscription> |
createPull(PullJsonType type,
PreparedHistoricsQuery historics,
Stream stream,
String name,
Status initialStatus,
long start,
long end) |
FutureData<PushSubscription> |
createPull(PullJsonType jsonMeta,
PreparedHistoricsQuery historics,
String name) |
FutureData<PushSubscription> |
createPull(PullJsonType jsonMeta,
PreparedHistoricsQuery historics,
String name,
Status initialStatus,
long start,
long end)
Create a push subscription to be consumed via
pull(PushSubscription, int, String) using a live stream |
FutureData<PushSubscription> |
createPull(PullJsonType jsonMeta,
Stream stream,
String name) |
FutureData<PushSubscription> |
createPull(PullJsonType jsonMeta,
Stream stream,
String name,
Status initialStatus,
long start,
long end)
Create a push subscription to be consumed via
pull(PushSubscription, int, String) using a live stream |
FutureData<DataSiftResult> |
delete(String id)
Delete a push subsctiption
|
FutureData<PushCollection> |
get(HistoricsQuery historics,
int page,
int perPage,
String orderBy,
String orderDirection,
boolean includeFinished)
Get all push subscriptions for the given historics
|
FutureData<PushCollection> |
get(int page,
int perPage,
String orderBy,
String orderDirection,
boolean includeFinished)
Get all push subscriptions belonging to this user
|
FutureData<PushCollection> |
get(Stream hash,
int page,
int perPage,
String orderBy,
String orderDirection,
boolean includeFinished)
Get all push subscriptions for the given stream
|
FutureData<PushSubscription> |
get(String id) |
FutureData<PushLogMessages> |
log(String id,
int page) |
FutureData<PushLogMessages> |
log(String id,
int page,
int perPage,
String orderBy,
String orderDirection)
Retreive log messages about subscriptions
|
FutureData<PushSubscription> |
pause(String id)
Pause the push subscription with the given ID
|
FutureData<PulledInteractions> |
pull(PushSubscription id) |
FutureData<PulledInteractions> |
pull(PushSubscription id,
int size,
String cursor)
Retrieve one or more interactions from a Push queue
|
FutureData<PushSubscription> |
resume(String id)
Set a paused subscription to run again
|
protected void |
sendPullRequest(FutureData<PulledInteractions> future,
PushSubscription id,
int size,
String cursor,
URI uri,
PullReader reader) |
FutureData<PushSubscription> |
stop(String id)
Stop/cancel a given push subscription
|
FutureData<PushSubscription> |
update(String id,
PushConnector connector) |
FutureData<PushSubscription> |
update(String id,
PushConnector connector,
String name)
Updates the name or output parameters for a push sucription
|
<T extends PushConnector> |
validate(T connector)
Check that the subscription details are correct
|
failNotify, newParams, newRequestCallback, performRequest, unwrapFuturepublic final String VALIDATE
public final String CREATE
public final String PAUSE
public final String RESUME
public final String UPDATE
public final String STOP
public final String DELETE
public final String LOG
public final String GET
public final String PULL
public DataSiftPush(DataSiftConfig config)
public FutureData<PushSubscription> pause(String id)
id - the id of the push subscription to pausepublic FutureData<PushSubscription> resume(String id)
id - the id of the push subscription to resumepublic FutureData<PushSubscription> stop(String id)
id - the id of the push subscriptionpublic FutureData<DataSiftResult> delete(String id)
id - the id of the subscription to deletepublic FutureData<PushSubscription> update(String id, PushConnector connector)
public FutureData<PushSubscription> update(String id, PushConnector connector, String name)
id - the subscription IDconnector - the output parameters to update toname - an optional name to update withpublic FutureData<PulledInteractions> pull(PushSubscription id)
public FutureData<PulledInteractions> pull(PushSubscription id, int size, String cursor)
id - the push subscription IDsize - max number of interactions to listcursor - a pointer into the pushprotected void sendPullRequest(FutureData<PulledInteractions> future, PushSubscription id, int size, String cursor, URI uri, PullReader reader)
public FutureData<PushLogMessages> log(String id, int page)
public FutureData<PushLogMessages> log(String id, int page, int perPage, String orderBy, String orderDirection)
id - the ID of a subscriptionpage - the page numberperPage - numbe rof items per pageorderBy - the field DataSift will use to order the resultorderDirection - the direction of ordering, asc or descpublic FutureData<PushSubscription> get(String id)
id - A push subscription IDpublic FutureData<PushCollection> get(int page, int perPage, String orderBy, String orderDirection, boolean includeFinished)
page - a page numberperPage - the amount of items per pageorderBy - the field name to order data by e.g. created_atorderDirection - an order, asc or descincludeFinished - whether to included completed subscriptions or notIterablepublic FutureData<PushCollection> get(Stream hash, int page, int perPage, String orderBy, String orderDirection, boolean includeFinished)
hash - the ID of the stream to fetch all associated push subscriptions forpage - a page numberperPage - the amount of items per pageorderBy - the field name to order data by e.g. created_atorderDirection - an order, asc or descincludeFinished - whether to included completed subscriptions or notIterablepublic FutureData<PushCollection> get(HistoricsQuery historics, int page, int perPage, String orderBy, String orderDirection, boolean includeFinished)
historics - the ID of the stream to fetch all associated push subscriptions forpage - a page numberperPage - the amount of items per pageorderBy - the field name to order data by e.g. created_atorderDirection - an order, asc or descincludeFinished - whether to included completed subscriptions or notIterablepublic <T extends PushConnector> FutureData<PushValidation> validate(T connector)
public <T extends PushConnector> FutureData<PushSubscription> create(T connector, FutureData<PreparedHistoricsQuery> historics, FutureData<Stream> stream, String name)
public <T extends PushConnector> FutureData<PushSubscription> create(T connector, PreparedHistoricsQuery historics, String name, Status initialStatus, long start, long end)
public <T extends PushConnector> FutureData<PushSubscription> create(T con, FutureData<PreparedHistoricsQuery> query, String name)
public <T extends PushConnector> FutureData<PushSubscription> create(T con, Stream stream, String name)
public <T extends PushConnector> FutureData<PushSubscription> create(T connector, Stream stream, String name, Status initialStatus, long start, long end)
public FutureData<PushSubscription> createPull(PullJsonType jsonMeta, PreparedHistoricsQuery historics, String name, Status initialStatus, long start, long end)
pull(PushSubscription, int, String) using a live streamhistorics - the historic query which will be consumed via pullname - a name for the subscriptioninitialStatus - the initial status of the subscriptionstart - an option timestamp of when to start the subscriptionend - an optional timestamp of when to stoppublic FutureData<PushSubscription> createPull(PullJsonType jsonMeta, PreparedHistoricsQuery historics, String name)
public FutureData<PushSubscription> createPull(PullJsonType jsonMeta, Stream stream, String name, Status initialStatus, long start, long end)
pull(PushSubscription, int, String) using a live streamstream - the stream which will be consumed via pullname - a name for the subscriptioninitialStatus - the initial status of the subscriptionstart - an option timestamp of when to start the subscriptionend - an optional timestamp of when to stoppublic FutureData<PushSubscription> createPull(PullJsonType jsonMeta, Stream stream, String name)
public FutureData<PushSubscription> createPull(PullJsonType type, PreparedHistoricsQuery historics, Stream stream, String name, Status initialStatus, long start, long end)
public <T extends PushConnector> FutureData<PushSubscription> create(T connector, FutureData<PreparedHistoricsQuery> historics, FutureData<Stream> stream, String name, Status initialStatus, long start, long end)
connector - a connector matching the one used in the first parameterhistorics - a historics to which the subscription is being made or null if the subscription is to a
live streamstream - A live stream to which this subscription is being created or null if the subscription is
to an historics queryname - a name for the subscriptioninitialStatus - optionally one of {active,paused,waiting_for_start}start - optional unix timestamp, ignored if < 1 - marks the start time for a subscription,
must be less than endend - optional unix timestamp, ignored if < 1 - marks end time for a subscription,
must be greater than startCopyright © 2015. All Rights Reserved.