Package org.streamingpool.core.service
Interface StreamCreator<T>
-
- Type Parameters:
T- the type of data that the stream contains
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface StreamCreator<T>Interface that represents an entity that is able to create a specificPublisher. The implementations of this interfaces should know a priori the type and how to create aPublisher.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<T>createWith(DiscoveryService discoveryService)Creates aPublisher.
-
-
-
Method Detail
-
createWith
org.reactivestreams.Publisher<T> createWith(DiscoveryService discoveryService)
Creates aPublisher. The providedDiscoveryServicecan be used to discover otherPublishers in order to combine them during the creation process.NOTE: it is strongly discouraged the use of multiple threads inside this method (see
TypedStreamFactorydocumentation).- Parameters:
discoveryService-DiscoveryServicewhich can be used by the factory to look up other streams ('upstream' of the one it will create)- Returns:
- the newly created
Publisher
-
-