Class LocalPool

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFallback​(StreamFactory fallbackFactory)
      Add a given factory as a falback.
      void addIntercept​(StreamFactory interceptFactory)
      Add a given factory as an interceptor.Intercept means that the factory will have a possibility to create publisher before standard injected factories.
      <T> org.reactivestreams.Publisher<T> discover​(StreamId<T> id)
      Given a StreamId, this method returns the correspondent Publisher.
      <T> void provide​(StreamId<T> id, org.reactivestreams.Publisher<T> obs)
      Provides the stream with the specified id.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • provide

        public <T> void provide​(StreamId<T> id,
                                org.reactivestreams.Publisher<T> obs)
        Description copied from interface: ProvidingService
        Provides the stream with the specified id. From the moment the stream is provided, it can be accessed from DiscoveryService using the same StreamId.
        Specified by:
        provide in interface ProvidingService
        Parameters:
        id - the StreamId that identifies the specified stream
        obs - the Publisher to be provided
      • discover

        public <T> org.reactivestreams.Publisher<T> discover​(StreamId<T> id)
        Description copied from interface: DiscoveryService
        Given a StreamId, this method returns the correspondent Publisher. This method should not return null, instead is preferred to throw a specific exception in the case the given id is not present in the system. From the API level, this behavior is not forced.
        Specified by:
        discover in interface DiscoveryService
        Parameters:
        id - the identifier of the stream to be discovered
        Returns:
        the discovered Publisher
      • addIntercept

        public void addIntercept​(StreamFactory interceptFactory)
        Description copied from interface: StreamFactoryRegistry
        Add a given factory as an interceptor.Intercept means that the factory will have a possibility to create publisher before standard injected factories.
        Specified by:
        addIntercept in interface StreamFactoryRegistry