public class StreamJunction extends Object implements EventBufferHolder
StreamJunction.Publisher can be used to publish events to the junction and
StreamJunction.Receiver can be used to receive events from Stream Junction. Stream Junction will hold the
events till they are consumed by registered Receivers.| Modifier and Type | Class and Description |
|---|---|
class |
StreamJunction.Publisher
Interface to be implemented to send events into the Stream Junction.
|
static interface |
StreamJunction.Receiver
Interface to be implemented by all receivers who need to subscribe to Stream Junction and receive events.
|
| Constructor and Description |
|---|
StreamJunction(org.wso2.siddhi.query.api.definition.StreamDefinition streamDefinition,
ExecutorService executorService,
int bufferSize,
SiddhiAppContext siddhiAppContext) |
| Modifier and Type | Method and Description |
|---|---|
StreamJunction.Publisher |
constructPublisher() |
boolean |
containsBufferedEvents() |
long |
getBufferedEvents() |
org.wso2.siddhi.query.api.definition.StreamDefinition |
getStreamDefinition() |
String |
getStreamId() |
void |
sendEvent(ComplexEvent complexEvent) |
void |
sendEvent(Event event) |
void |
startProcessing()
Create and start disruptor based on annotations given in the streamDefinition.
|
void |
stopProcessing() |
void |
subscribe(StreamJunction.Receiver receiver) |
public StreamJunction(org.wso2.siddhi.query.api.definition.StreamDefinition streamDefinition,
ExecutorService executorService,
int bufferSize,
SiddhiAppContext siddhiAppContext)
public void sendEvent(ComplexEvent complexEvent)
public void sendEvent(Event event)
public void startProcessing()
public void stopProcessing()
public StreamJunction.Publisher constructPublisher()
public void subscribe(StreamJunction.Receiver receiver)
public String getStreamId()
public org.wso2.siddhi.query.api.definition.StreamDefinition getStreamDefinition()
public long getBufferedEvents()
getBufferedEvents in interface EventBufferHolderpublic boolean containsBufferedEvents()
containsBufferedEvents in interface EventBufferHolderCopyright © 2018 WSO2. All rights reserved.