Class DefaultInstructionAckSource<T>
java.lang.Object
org.axonframework.axonserver.connector.DefaultInstructionAckSource<T>
- Type Parameters:
T- the type of message to be sent
- All Implemented Interfaces:
InstructionAckSource<T>
Default implementation of
InstructionAckSource.- Since:
- 4.2.1
- Author:
- Milan Savic
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInstructionAckSource(Function<io.axoniq.axonserver.grpc.InstructionAck, T> messageCreator) InstantiatesDefaultInstructionAckSource. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.axonserver.connector.InstructionAckSource
sendSuccessfulAck, sendUnsuccessfulAck, sendUnsupportedInstruction
-
Constructor Details
-
DefaultInstructionAckSource
public DefaultInstructionAckSource(Function<io.axoniq.axonserver.grpc.InstructionAck, T> messageCreator) InstantiatesDefaultInstructionAckSource.- Parameters:
messageCreator- creates a message based onInstructionAck
-
-
Method Details
-
sendAck
public void sendAck(String instructionId, boolean success, io.axoniq.axonserver.grpc.ErrorMessage error, io.grpc.stub.StreamObserver<T> stream) Description copied from interface:InstructionAckSourceSends an acknowledgement.- Specified by:
sendAckin interfaceInstructionAckSource<T>- Parameters:
instructionId- identifier of successful instruction. Ifnull, acknowledgement will not be sent.success-trueif acknowledgement is successful,falseotherwiseerror- the cause of the error. Providenullfor successful acknowledgementstream- the stream for sending acknowledgements
-