Class InboxItemStoredHandler
java.lang.Object
software.spool.publisher.internal.control.InboxItemStoredHandler
- All Implemented Interfaces:
software.spool.core.control.Handler<software.spool.core.model.InboxItemStored>
public class InboxItemStoredHandler
extends Object
implements software.spool.core.control.Handler<software.spool.core.model.InboxItemStored>
Handler that processes
InboxItemStored events by updating the
inbox item status through a publishing lifecycle.
The processing flow for each event:
- Update the inbox item status to
PUBLISHING. - Emit an
ItemPublishedevent with the item payload. - Update the inbox item status to
PUBLISHED.
If the inbox item no longer exists (update returns null), the
event is silently skipped.
-
Constructor Summary
ConstructorsConstructorDescriptionInboxItemStoredHandler(software.spool.core.port.InboxUpdater updater, software.spool.core.port.EventBusEmitter emitter, software.spool.core.utils.ErrorRouter errorRouter) Creates a new handler with the given ports. -
Method Summary
-
Constructor Details
-
InboxItemStoredHandler
public InboxItemStoredHandler(software.spool.core.port.InboxUpdater updater, software.spool.core.port.EventBusEmitter emitter, software.spool.core.utils.ErrorRouter errorRouter) Creates a new handler with the given ports.- Parameters:
updater- the inbox updater for changing item statusesemitter- the event bus emitter for publishing events
-
-
Method Details
-
handle
public void handle(software.spool.core.model.InboxItemStored object) - Specified by:
handlein interfacesoftware.spool.core.control.Handler<software.spool.core.model.InboxItemStored>
-