Class CloseCallbackMessageStream<M extends Message>

java.lang.Object
org.axonframework.messaging.core.AbstractMessageStream<M>
org.axonframework.messaging.core.CloseCallbackMessageStream<M>
Type Parameters:
M - The type of Message handled by this MessageStream.
All Implemented Interfaces:
MessageStream<M>

public class CloseCallbackMessageStream<M extends Message> extends AbstractMessageStream<M>
MessageStream implementation that invokes the given closeHandler once the stream is closed. A stream is considered closed when a consumer explicitly calls AbstractMessageStream.close() or when the stream is completed.

Note that when close is called on the delegate, or when the client does not attempt to consume this stream, the close handler may never be invoked, even though the stream is completed.

Since:
5.0.0
Author:
John Hendrikx