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 StreamsOperation
public 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 StreamsProvider
public StreamsResultSet readCurrent()
readCurrent
in interface StreamsProvider
public StreamsResultSet readNew(BigInteger sequence)
readNew
in interface StreamsProvider
public StreamsResultSet readRange(org.joda.time.DateTime start, org.joda.time.DateTime end)
readRange
in interface StreamsProvider
public boolean isRunning()
isRunning
in interface StreamsProvider
public void prepare(Object configurationObject)
prepare
in interface StreamsOperation
public void cleanUp()
cleanUp
in interface StreamsOperation
Copyright © 2017 The Apache Software Foundation. All rights reserved.