S
- current state of the Sourcepublic abstract class Source<S extends State> 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,
S state)
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
|
protected abstract ServiceDeploymentInfo |
exposeServiceDeploymentInfo()
Give information to the deployment about the service exposed by the sink.
|
SourceMapper |
getMapper() |
abstract Class[] |
getOutputEventClasses()
Get produced event class types
|
ServiceDeploymentInfo |
getServiceDeploymentInfo() |
io.siddhi.query.api.definition.StreamDefinition |
getStreamDefinition() |
String |
getType() |
abstract StateFactory<S> |
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,
Map<String,String> deploymentProperties,
SiddhiAppContext siddhiAppContext) |
boolean |
isStateful() |
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, Map<String,String> deploymentProperties, SiddhiAppContext siddhiAppContext)
protected abstract ServiceDeploymentInfo exposeServiceDeploymentInfo()
public abstract StateFactory<S> 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, S state) throws ConnectionUnavailableException
connectionCallback
- Callback to pass the ConnectionUnavailableException for connection failure after
initial successful connectionstate
- current state of the sourceConnectionUnavailableException
- 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()
public ServiceDeploymentInfo getServiceDeploymentInfo()
public boolean isStateful()
Copyright © 2019. All rights reserved.