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:

  1. Update the inbox item status to PUBLISHING.
  2. Emit an ItemPublished event with the item payload.
  3. Update the inbox item status to PUBLISHED.

If the inbox item no longer exists (update returns null), the event is silently skipped.

  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(software.spool.core.model.InboxItemStored object)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 statuses
      emitter - the event bus emitter for publishing events
  • Method Details

    • handle

      public void handle(software.spool.core.model.InboxItemStored object)
      Specified by:
      handle in interface software.spool.core.control.Handler<software.spool.core.model.InboxItemStored>