Package software.spool.publisher.api
Class Feeder
java.lang.Object
software.spool.publisher.api.Feeder
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 Summary
ConstructorsConstructorDescriptionFeeder(FeederStrategy strategy, software.spool.core.utils.ErrorRouter errorRouter) Creates a newFeederwith the given strategy and error router. -
Method Summary
Modifier and TypeMethodDescriptionvoidStarts the publishing process.voidStops the publishing process.
-
Constructor Details
-
Feeder
Creates a newFeederwith the given strategy and error router.- Parameters:
strategy- the publishing strategy to use; must not benullerrorRouter- the error router for handling exceptions; must not benull
-
-
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 configuredErrorRouter. -
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 configuredErrorRouter.
-