public class GrpcCallSink extends AbstractGrpcSink
GrpcCallSink Handle the gRPC publishing tasks and injects response into grpc-call-response source.| Modifier and Type | Field and Description |
|---|---|
protected io.grpc.stub.AbstractStub |
futureStub |
protected String |
sinkID |
channel, channelTerminationWaitingTimeInMillis, headersMap, headersOption, managedChannelBuilder, metadataOption, serviceConfigs, siddhiAppName, streamDefinition, streamID| Constructor and Description |
|---|
GrpcCallSink() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
This method will be called before the processing method.
|
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. |
void |
initSink(io.siddhi.core.util.transport.OptionHolder optionHolder) |
void |
publish(Object payload,
io.siddhi.core.util.transport.DynamicOptions dynamicOptions,
io.siddhi.core.util.snapshot.state.State state) |
addHeadersToEventBuilder, attachMetaDataToStub, destroy, exposeServiceDeploymentInfo, getSupportedDynamicOptions, getSupportedInputEventClasses, initprotected String sinkID
protected io.grpc.stub.AbstractStub futureStub
public void initSink(io.siddhi.core.util.transport.OptionHolder optionHolder)
initSink in class AbstractGrpcSinkpublic 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.Sinkio.siddhi.core.exception.ConnectionUnavailableExceptionpublic 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 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.SinkCopyright © 2019 WSO2. All rights reserved.