public class EmailSink
extends io.siddhi.core.stream.output.sink.Sink
| Constructor and Description |
|---|
EmailSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
This method will be called before the processing method.
|
void |
destroy()
The method can be called when removing an event receiver.
|
void |
disconnect()
Called after all publishing is done, or when
ConnectionUnavailableException is thrown
Implementation of this method should contain the steps needed to disconnect from the sink. |
protected io.siddhi.core.stream.ServiceDeploymentInfo |
exposeServiceDeploymentInfo() |
String[] |
getSupportedDynamicOptions()
Returns a list of supported dynamic options (that means for each event value of the option can change) by
the transport
|
Class[] |
getSupportedInputEventClasses()
Returns the list of classes which this sink can consume.
|
protected io.siddhi.core.util.snapshot.state.StateFactory |
init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
io.siddhi.core.util.transport.OptionHolder optionHolder,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.config.SiddhiAppContext siddhiAppContext)
The initialization method for
Sink, which will be called before other methods and validate
the all configuration and getting the intial values. |
void |
publish(Object payload,
io.siddhi.core.util.transport.DynamicOptions dynamicOptions,
io.siddhi.core.util.snapshot.state.State state)
This method will be called when events need to be published via this sink
|
protected io.siddhi.core.util.snapshot.state.StateFactory init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
io.siddhi.core.util.transport.OptionHolder optionHolder,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.config.SiddhiAppContext siddhiAppContext)
Sink, which will be called before other methods and validate
the all configuration and getting the intial values.init in class io.siddhi.core.stream.output.sink.SinkstreamDefinition - containing stream definition bind to the SinkoptionHolder - Option holder containing static and dynamic configuration related
to the SinkconfigReader - to read the sink related system configuration.siddhiAppContext - the context of the SiddhiApp used to
get siddhi related utilty functions.public void connect()
throws io.siddhi.core.exception.ConnectionUnavailableException
connect in class io.siddhi.core.stream.output.sink.Sinkio.siddhi.core.exception.ConnectionUnavailableException - if end point is unavailable the ConnectionUnavailableException thrown
such that the system will take care retrying for connectionpublic void publish(Object payload, io.siddhi.core.util.transport.DynamicOptions dynamicOptions, io.siddhi.core.util.snapshot.state.State state) throws io.siddhi.core.exception.ConnectionUnavailableException
publish in class io.siddhi.core.stream.output.sink.Sinkpayload - payload of the event based on the supported event class exported by the extensionsdynamicOptions - holds the dynamic options of this sink and Use this object to obtain dynamic options.io.siddhi.core.exception.ConnectionUnavailableException - if end point is unavailable the ConnectionUnavailableException thrown
such that the system will take care retrying for connectionpublic void disconnect()
ConnectionUnavailableException is thrown
Implementation of this method should contain the steps needed to disconnect from the sink.disconnect in class io.siddhi.core.stream.output.sink.Sinkpublic void destroy()
destroy in class io.siddhi.core.stream.output.sink.Sinkpublic String[] getSupportedDynamicOptions()
getSupportedDynamicOptions in class io.siddhi.core.stream.output.sink.Sinkpublic Class[] getSupportedInputEventClasses()
getSupportedInputEventClasses in class io.siddhi.core.stream.output.sink.Sinkprotected io.siddhi.core.stream.ServiceDeploymentInfo exposeServiceDeploymentInfo()
exposeServiceDeploymentInfo in class io.siddhi.core.stream.output.sink.SinkCopyright © 2020 WSO2. All rights reserved.