prepareObserver

protected StreamObserver<Ack> prepareObserver(Iterable<Command> commands, StreamObserver<Ack> source)

Prepares the given to post messages into this bus.

This method is an extension point of a Bus}.

When #post(Iterable, StreamObserver) posting messages into the bus, the message acknowledgements are passed to the observer created by this method.

Conventionally, the resulting should delegate calls to the source} observer, so that the caller receives the posting outcome. If violating this convention, the Bus} implementation should specify the altered behavior explicitly.

The messages} can be used to construct the observer. The resulting observer is used only for acknowledgment of the given messages.

By default, this method returns the source} observer. See Bus} subclasses for the altered behavior specification.

Wraps the source observer with the CommandAckMonitor.

Return

new instance of CommandAckMonitor with the given parameters