public class BinaryPassThroughSinkMapper
extends io.siddhi.core.stream.output.sink.SinkMapper
eg:-
@Extension(
name = "The name of the extension",
namespace = "The namespace of the extension",
description = "The description of the extension (optional).",
//Sink Mapper configurations
parameters = {
@Parameter(name = "The name of the first parameter",
description= "The description of the first parameter",
type = "Supported parameter types.
eg:{DataType.STRING, DataType.INT, DataType.LONG etc}",
dynamic= "false
(if parameter doesn't depend on each event then dynamic parameter is false.
In Source, only use static parameter)",
optional= "true/false, defaultValue= if it is optional then assign a default value
according to the type."),
@Parameter(name = "The name of the second parameter",
description= "The description of the second parameter",
type = "Supported parameter types.
eg:{DataType.STRING, DataType.INT, DataType.LONG etc}",
dynamic= "false
(if parameter doesn't depend on each event then dynamic parameter is false.
In Source, only use static parameter)",
optional= "true/false, defaultValue= if it is optional then assign a default value
according to the type."),
},
//If Sink Mapper system configurations will need then
systemParameters = {
@SystemParameter(name = "The name of the first system parameter",
description="The description of the first system parameter." ,
defaultValue = "the default value of the system parameter.",
possibleParameter="the possible value of the system parameter.",
),
},
examples = {
@Example(syntax = "sample query with Sink Mapper annotation that explain how extension use in Siddhi."
description =" The description of the given example's query."
),
}
)
| Constructor and Description |
|---|
BinaryPassThroughSinkMapper() |
| Modifier and Type | Method and Description |
|---|---|
Class[] |
getOutputEventClasses()
Returns the list of classes which this sink can consume.
|
String[] |
getSupportedDynamicOptions()
Returns a list of supported dynamic options (that means for each event value of the option can change) by
the transport.
|
void |
init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.config.SiddhiAppContext siddhiAppContext)
The initialization method for
SinkMapper, which will be called before other methods and validate
the all configuration and getting the initial values. |
void |
mapAndSend(io.siddhi.core.event.Event[] events,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.stream.output.sink.SinkListener sinkListener)
Method to map the events and send them to
SinkListener for publishing. |
void |
mapAndSend(io.siddhi.core.event.Event event,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.stream.output.sink.SinkListener sinkListener)
Method to map the event and send it to
SinkListener for publishing. |
public void init(io.siddhi.query.api.definition.StreamDefinition streamDefinition,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.config.SiddhiAppContext siddhiAppContext)
SinkMapper, which will be called before other methods and validate
the all configuration and getting the initial values.init in class io.siddhi.core.stream.output.sink.SinkMapperstreamDefinition - containing stream definition bind to the SinkMapperoptionHolder - Option holder containing static and dynamic configuration related
to the SinkMappermap - Unmapped payload for referenceconfigReader - to read the sink related system configuration.siddhiAppContext - the context of the SiddhiApp used to
get siddhi related utilty functions.public String[] getSupportedDynamicOptions()
getSupportedDynamicOptions in class io.siddhi.core.stream.output.sink.SinkMapperpublic Class[] getOutputEventClasses()
SinkMapper of type event can convert to CSV file objects of type String or byte.getOutputEventClasses in class io.siddhi.core.stream.output.sink.SinkMapperpublic void mapAndSend(io.siddhi.core.event.Event[] events,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.stream.output.sink.SinkListener sinkListener)
SinkListener for publishing.mapAndSend in class io.siddhi.core.stream.output.sink.SinkMapperevents - Events that need to be mappedoptionHolder - Option holder containing static and dynamic options related to the mappermap - To build the message payload based on the given templatesinkListener - SinkListener that will be called with the mapped eventspublic void mapAndSend(io.siddhi.core.event.Event event,
io.siddhi.core.util.transport.OptionHolder optionHolder,
Map<String,io.siddhi.core.util.transport.TemplateBuilder> map,
io.siddhi.core.stream.output.sink.SinkListener sinkListener)
SinkListener for publishing.mapAndSend in class io.siddhi.core.stream.output.sink.SinkMapperevent - Event that need to be mappedoptionHolder - Option holder containing static and dynamic options related to the mappermap - To build the message payload based on the given templatesinkListener - SinkListener that will be called with the mapped eventCopyright © 2021 WSO2. All rights reserved.