public class GenericWebhookResource extends Object implements StreamsProvider
| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
lock |
protected Queue<StreamsDatum> |
providerQueue |
static String |
STREAMS_ID |
| Constructor and Description |
|---|
GenericWebhookResource() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
String |
getId() |
boolean |
isRunning() |
javax.ws.rs.core.Response |
json_meta(javax.ws.rs.core.HttpHeaders headers,
String body)
push multiple ObjectNode json datums into a stream.
|
javax.ws.rs.core.Response |
json_new_line(javax.ws.rs.core.HttpHeaders headers,
String body)
push multiple String json datums into a stream.
|
javax.ws.rs.core.Response |
json(javax.ws.rs.core.HttpHeaders headers,
String body)
push a String json datum into a stream.
|
void |
prepare(Object configurationObject) |
StreamsResultSet |
readCurrent() |
StreamsResultSet |
readNew(BigInteger sequence) |
StreamsResultSet |
readRange(org.joda.time.DateTime start,
org.joda.time.DateTime end) |
void |
startStream() |
public static final String STREAMS_ID
protected Queue<StreamsDatum> providerQueue
protected final ReadWriteLock lock
public String getId()
getId in interface StreamsOperationpublic javax.ws.rs.core.Response json(@Context
javax.ws.rs.core.HttpHeaders headers,
String body)
headers - HttpHeadersbody - String jsonpublic javax.ws.rs.core.Response json_new_line(@Context
javax.ws.rs.core.HttpHeaders headers,
String body)
headers - HttpHeadersbody - String jsonpublic javax.ws.rs.core.Response json_meta(@Context
javax.ws.rs.core.HttpHeaders headers,
String body)
headers - HttpHeadersbody - String jsonpublic void startStream()
startStream in interface StreamsProviderpublic StreamsResultSet readCurrent()
readCurrent in interface StreamsProviderpublic StreamsResultSet readNew(BigInteger sequence)
readNew in interface StreamsProviderpublic StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange in interface StreamsProviderpublic boolean isRunning()
isRunning in interface StreamsProviderpublic void prepare(Object configurationObject)
prepare in interface StreamsOperationpublic void cleanUp()
cleanUp in interface StreamsOperationCopyright © 2012–2016 The Apache Software Foundation. All rights reserved.