public class AkkaStreamFactory extends java.lang.Object implements AkkaSourceProvidingService, StreamFactory
| Constructor and Description |
|---|
AkkaStreamFactory(akka.stream.Materializer materializer) |
| Modifier and Type | Method and Description |
|---|---|
<T> ErrorStreamPair<T> |
create(StreamId<T> newId,
DiscoveryService discoveryService)
|
<T> void |
provide(StreamId<T> id,
akka.stream.javadsl.Source<T,?> akkaSource) |
public AkkaStreamFactory(akka.stream.Materializer materializer)
public <T> ErrorStreamPair<T> create(StreamId<T> newId, DiscoveryService discoveryService)
StreamFactoryStreamId and a DiscoveryService this method creates a
Publisher. The provided DiscoveryService can be used to discover other streams that are
needed in the creation process (stream combination, transformation, etc.)
NOTE: it is strongly discouraged the use of multiple threads inside this method (see
TypedStreamFactory documentation).create in interface StreamFactorynewId - the id of the stream to creatediscoveryService - DiscoveryService which can be used by the factory to look up other streams
('upstream' of the one it will create)null if this factory cannot create the stream of the given idpublic <T> void provide(StreamId<T> id, akka.stream.javadsl.Source<T,?> akkaSource)
provide in interface AkkaSourceProvidingService