Class Feeder

java.lang.Object
software.spool.publisher.api.Feeder

public class Feeder extends Object
Main API entry point for the publishing lifecycle.

A Feeder wraps a FeederStrategy and manages start/stop semantics with built-in error routing. It acts as the bridge between the inbox and downstream event channels.

Use the fluent builders in FeederBuilderFactory to construct instances:


 Feeder feeder = FeederBuilderFactory.reactive()
         .from(eventBusListener)
         .with(inboxUpdater)
         .on(eventBusEmitter)
         .withErrorRouter(errorRouter)
         .create();

 feeder.startPublishing();
 
See Also:
  • Constructor Details

    • Feeder

      public Feeder(FeederStrategy strategy, software.spool.core.utils.ErrorRouter errorRouter)
      Creates a new Feeder with the given strategy and error router.
      Parameters:
      strategy - the publishing strategy to use; must not be null
      errorRouter - the error router for handling exceptions; must not be null
  • Method Details

    • startPublishing

      public void startPublishing()
      Starts the publishing process.

      Delegates to the underlying FeederStrategy.start() and stores the resulting subscription. Calling this method when publishing is already active has no effect. Any exceptions are routed through the configured ErrorRouter.

    • stopPublishing

      public void stopPublishing()
      Stops the publishing process.

      Delegates to the underlying FeederStrategy.stop() and clears the subscription. Calling this method when publishing is already stopped has no effect. Any exceptions are routed through the configured ErrorRouter.