T
- the type of message to be sent@FunctionalInterface public interface InstructionAckSource<T>
Modifier and Type | Method and Description |
---|---|
void |
sendAck(String instructionId,
boolean success,
ErrorMessage error,
io.grpc.stub.StreamObserver<T> stream)
Sends an acknowledgement.
|
default void |
sendSuccessfulAck(String instructionId,
io.grpc.stub.StreamObserver<T> stream)
Sends successful acknowledgement.
|
default void |
sendUnsuccessfulAck(String instructionId,
ErrorMessage error,
io.grpc.stub.StreamObserver<T> stream)
Sends unsuccessful acknowledgement.
|
default void |
sendUnsupportedInstruction(String instructionId,
String source,
io.grpc.stub.StreamObserver<T> stream)
Sends acknowledgement of unsupported instruction.
|
default void sendSuccessfulAck(String instructionId, io.grpc.stub.StreamObserver<T> stream)
instructionId
- identifier of successful instruction. If null
, acknowledgement will not be sent.stream
- the stream for sending acknowledgementsdefault void sendUnsupportedInstruction(String instructionId, String source, io.grpc.stub.StreamObserver<T> stream)
instructionId
- identifier of successful instruction. If null
, acknowledgement will not be sent.source
- the location where error occurredstream
- the stream for sending acknowledgementsdefault void sendUnsuccessfulAck(String instructionId, ErrorMessage error, io.grpc.stub.StreamObserver<T> stream)
instructionId
- identifier of successful instruction. If null
, acknowledgement will not be sent.error
- the cause of the errorstream
- the stream for sending acknowledgementsvoid sendAck(String instructionId, boolean success, ErrorMessage error, io.grpc.stub.StreamObserver<T> stream)
instructionId
- identifier of successful instruction. If null
, acknowledgement will not be sent.success
- true
if acknowledgement is successful, false
otherwiseerror
- the cause of the error. Provide null
for successful acknowledgementstream
- the stream for sending acknowledgementsCopyright © 2010–2020. All rights reserved.