public class StreamingData extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DataSiftConfig |
config |
protected boolean |
connected |
protected URI |
endpoint |
protected ErrorListener |
errorListener |
protected io.higgs.ws.client.WebSocketStream |
liveStream |
protected StreamEventListener |
streamEventListener |
protected Map<Stream,StreamSubscription> |
subscriptions |
protected Set<StreamSubscription> |
unsentSubscriptions |
| Constructor and Description |
|---|
StreamingData(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connect() |
protected void |
fireInteraction(String hash,
Interaction interaction) |
protected void |
fireMessage(DataSiftMessage message) |
StreamingData |
onError(ErrorListener listener)
Subscribes a callback to listen for exceptions that may occur during streaming.
|
void |
onStreamEvent(StreamEventListener streamEventListener) |
protected void |
pushUnsentSubscriptions() |
StreamingData |
subscribe(StreamSubscription subscription) |
StreamingData |
unsubscribe(Stream stream) |
protected URI endpoint
protected io.higgs.ws.client.WebSocketStream liveStream
protected DataSiftConfig config
protected Map<Stream,StreamSubscription> subscriptions
protected ErrorListener errorListener
protected StreamEventListener streamEventListener
protected boolean connected
protected Set<StreamSubscription> unsentSubscriptions
public StreamingData(DataSiftConfig config)
protected void connect()
protected void fireInteraction(String hash, Interaction interaction)
protected void fireMessage(DataSiftMessage message)
public StreamingData onError(ErrorListener listener)
listener - an error callbackpublic void onStreamEvent(StreamEventListener streamEventListener)
public StreamingData subscribe(StreamSubscription subscription)
protected void pushUnsentSubscriptions()
public StreamingData unsubscribe(Stream stream)
Copyright © 2013. All Rights Reserved.