public abstract class Source extends Object
Modifier and Type | Class and Description |
---|---|
class |
Source.ConnectionCallback
Callback class used to pass connection exception during message retrieval
|
Constructor and Description |
---|
Source() |
Modifier and Type | Method and Description |
---|---|
abstract void |
connect(Source.ConnectionCallback connectionCallback)
Called to connect to the source backend for receiving events
|
void |
connectWithRetry() |
abstract void |
destroy()
Called at the end to clean all the resources consumed
|
abstract void |
disconnect()
Called to disconnect from the source backend, or when ConnectionUnavailableException is thrown
|
SourceMapper |
getMapper() |
abstract Class[] |
getOutputEventClasses()
Get produced event class types
|
io.siddhi.query.api.definition.StreamDefinition |
getStreamDefinition() |
String |
getType() |
abstract void |
init(SourceEventListener sourceEventListener,
OptionHolder optionHolder,
String[] requestedTransportPropertyNames,
ConfigReader configReader,
SiddhiAppContext siddhiAppContext)
To initialize the source.
|
void |
init(String sourceType,
OptionHolder transportOptionHolder,
SourceMapper sourceMapper,
String[] transportPropertyNames,
ConfigReader configReader,
String mapType,
OptionHolder mapOptionHolder,
List<AttributeMapping> attributeMappings,
List<AttributeMapping> transportMappings,
ConfigReader mapperConfigReader,
SourceHandler sourceHandler,
io.siddhi.query.api.definition.StreamDefinition streamDefinition,
SiddhiAppContext siddhiAppContext) |
abstract void |
pause()
Called to pause event consumption
|
abstract void |
resume()
Called to resume event consumption
|
void |
shutdown() |
public final void init(String sourceType, OptionHolder transportOptionHolder, SourceMapper sourceMapper, String[] transportPropertyNames, ConfigReader configReader, String mapType, OptionHolder mapOptionHolder, List<AttributeMapping> attributeMappings, List<AttributeMapping> transportMappings, ConfigReader mapperConfigReader, SourceHandler sourceHandler, io.siddhi.query.api.definition.StreamDefinition streamDefinition, SiddhiAppContext siddhiAppContext)
public abstract void init(SourceEventListener sourceEventListener, OptionHolder optionHolder, String[] requestedTransportPropertyNames, ConfigReader configReader, SiddhiAppContext siddhiAppContext)
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 abstract Class[] getOutputEventClasses()
public abstract void connect(Source.ConnectionCallback connectionCallback) throws ConnectionUnavailableException
connectionCallback
- Callback to pass the ConnectionUnavailableException for connection failure after
initial successful connectionConnectionUnavailableException
- if it cannot connect to the source backendpublic abstract void disconnect()
public abstract void destroy()
public abstract void pause()
public abstract void resume()
public void connectWithRetry()
public final SourceMapper getMapper()
public void shutdown()
public String getType()
public io.siddhi.query.api.definition.StreamDefinition getStreamDefinition()
Copyright © 2019. All rights reserved.