public class LogSink extends Sink
Sink which can be used as a logger. This will log the output events in the output stream
with user specified priority and a prefixSink.OnErrorActionisTryingToConnect| Constructor and Description |
|---|
LogSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Called to connect to the backend before events are published
|
void |
destroy()
Called at the end to clean all the resources consumed
|
void |
disconnect()
Called after all publishing is done, or when ConnectionUnavailableException is thrown
|
protected ServiceDeploymentInfo |
exposeServiceDeploymentInfo()
Give information to the deployment about the service exposed by the sink.
|
String[] |
getSupportedDynamicOptions()
Supported dynamic options by the transport
|
Class[] |
getSupportedInputEventClasses() |
protected StateFactory<State> |
init(io.siddhi.query.api.definition.StreamDefinition outputStreamDefinition,
OptionHolder optionHolder,
ConfigReader sinkConfigReader,
SiddhiAppContext siddhiAppContext)
Will be called for initialing the
Sink |
void |
publish(Object payload,
DynamicOptions transportOptions,
State s)
Sending events via output transport
|
connectWithRetry, getHandler, getMapper, getServiceDeploymentInfoList, getStreamDefinition, getType, init, initOnlyTransport, isConnected, isStateful, onError, publish, retryPublish, setConnected, shutdownpublic Class[] getSupportedInputEventClasses()
getSupportedInputEventClasses in class Sinkprotected ServiceDeploymentInfo exposeServiceDeploymentInfo()
SinkexposeServiceDeploymentInfo in class Sinkpublic String[] getSupportedDynamicOptions()
SinkgetSupportedDynamicOptions in class Sinkprotected StateFactory<State> init(io.siddhi.query.api.definition.StreamDefinition outputStreamDefinition, OptionHolder optionHolder, ConfigReader sinkConfigReader, SiddhiAppContext siddhiAppContext)
SinkSinkinit in class SinkoutputStreamDefinition - containing stream definition bind to the SinkoptionHolder - Option holder containing static and dynamic options related to the SinksinkConfigReader - this hold the Sink extensions configuration reader.siddhiAppContext - SiddhiAppContext of the parent siddhi app.public void publish(Object payload, DynamicOptions transportOptions, State s) throws ConnectionUnavailableException
Sinkpublish in class Sinkpayload - payload of the eventtransportOptions - of the event constructing the payloads - current state of the sinkConnectionUnavailableException - throw when connections are unavailable.public void connect()
throws ConnectionUnavailableException
Sinkconnect in class SinkConnectionUnavailableException - if it cannot connect to the backendpublic void disconnect()
Sinkdisconnect in class SinkCopyright © 2020. All rights reserved.