Package io.smallrye.mutiny.streams.utils
Class CancellablePublisher<T>
java.lang.Object
io.smallrye.mutiny.streams.utils.CancellablePublisher<T>
- All Implemented Interfaces:
org.reactivestreams.Publisher<T>
Wrapped a source publisher and make it cancellable on demand. The cancellation happens if
no-one subscribed to the source publisher. This class is required for the
ConcatStageFactory to enforce the reactive
streams rules.- Author:
- Clement Escoffier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoid
-
Constructor Details
-
CancellablePublisher
-
-
Method Details
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<T>
-
cancelIfNotSubscribed
public void cancelIfNotSubscribed()
-