public abstract class AbstractGrpcSink
extends io.siddhi.core.stream.output.sink.Sink
AbstractGrpcSink is a super class extended by GrpcCallSink, and GrpcSink.
This provides most of the initialization implementations.| Modifier and Type | Field and Description |
|---|---|
protected io.grpc.ManagedChannel |
channel |
protected long |
channelTerminationWaitingTimeInMillis |
protected Map<String,String> |
headersMap |
protected io.siddhi.core.util.transport.Option |
headersOption |
protected io.grpc.ManagedChannelBuilder |
managedChannelBuilder |
protected io.siddhi.core.util.transport.Option |
metadataOption |
protected ServiceConfigs |
serviceConfigs |
protected String |
siddhiAppName |
protected io.siddhi.query.api.definition.StreamDefinition |
streamDefinition |
protected String |
streamID |
| Constructor and Description |
|---|
AbstractGrpcSink() |
| Modifier and Type | Method and Description |
|---|---|
Event.Builder |
addHeadersToEventBuilder(io.siddhi.core.util.transport.DynamicOptions dynamicOptions,
Event.Builder eventBuilder) |
io.grpc.stub.AbstractStub |
attachMetaDataToStub(io.siddhi.core.util.transport.DynamicOptions dynamicOptions,
io.grpc.stub.AbstractStub stub) |
void |
destroy()
The method can be called when removing an event receiver.
|
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, will be called before other methods. |
abstract void |
initSink(io.siddhi.core.util.transport.OptionHolder optionHolder) |
protected String siddhiAppName
protected io.grpc.ManagedChannel channel
protected String streamID
protected io.siddhi.core.util.transport.Option headersOption
protected io.siddhi.core.util.transport.Option metadataOption
protected io.grpc.ManagedChannelBuilder managedChannelBuilder
protected long channelTerminationWaitingTimeInMillis
protected ServiceConfigs serviceConfigs
protected io.siddhi.query.api.definition.StreamDefinition streamDefinition
public 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.Sinkpublic String[] getSupportedDynamicOptions()
getSupportedDynamicOptions in class io.siddhi.core.stream.output.sink.Sinkprotected 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, will be called before other methods. It used to validate
all configurations and to get initial 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 topublic abstract void initSink(io.siddhi.core.util.transport.OptionHolder optionHolder)
public void destroy()
destroy in class io.siddhi.core.stream.output.sink.Sinkpublic Event.Builder addHeadersToEventBuilder(io.siddhi.core.util.transport.DynamicOptions dynamicOptions, Event.Builder eventBuilder)
public io.grpc.stub.AbstractStub attachMetaDataToStub(io.siddhi.core.util.transport.DynamicOptions dynamicOptions,
io.grpc.stub.AbstractStub stub)
Copyright © 2019 WSO2. All rights reserved.