Source.ConnectionCallback
Constructor and Description |
---|
InMemorySource() |
Modifier and Type | Method and Description |
---|---|
void |
connect(Source.ConnectionCallback connectionCallback)
Called to connect to the source backend for receiving events
|
void |
destroy()
Called at the end to clean all the resources consumed
|
void |
disconnect()
Called to disconnect from the source backend, or when ConnectionUnavailableException is thrown
|
Class[] |
getOutputEventClasses()
Get produced event class types
|
void |
init(SourceEventListener sourceEventListener,
OptionHolder optionHolder,
String[] requestedTransportPropertyNames,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext)
To initialize the source.
|
void |
pause()
Called to pause event consumption
|
void |
resume()
Called to resume event consumption
|
connectWithRetry, getMapper, getStreamDefinition, getType, init, shutdown
public void init(SourceEventListener sourceEventListener, OptionHolder optionHolder, String[] requestedTransportPropertyNames, ConfigReader configReader, SiddhiAppContext siddhiAppContext)
Source
init
in class Source
sourceEventListener
- The listener to pass the events for processing which are consumed
by the sourceoptionHolder
- Contains static options of the sourcerequestedTransportPropertyNames
- Requested transport properties that should be passed to
SourceEventListenerconfigReader
- System configuration reader for sourcesiddhiAppContext
- Siddhi application contextpublic Class[] getOutputEventClasses()
Source
getOutputEventClasses
in class Source
public void connect(Source.ConnectionCallback connectionCallback) throws ConnectionUnavailableException
Source
connect
in class Source
connectionCallback
- Callback to pass the ConnectionUnavailableException for connection failure after
initial successful connectionConnectionUnavailableException
- if it cannot connect to the source backendpublic void disconnect()
Source
disconnect
in class Source
public void destroy()
Source
public void pause()
Source
Copyright © 2019. All rights reserved.