Class SafeInboxReader
java.lang.Object
software.spool.publisher.internal.port.decorator.SafeInboxReader
- All Implemented Interfaces:
InboxReader
Decorator for
InboxReader that normalises unchecked exceptions
into typed InboxReadException instances.
If the delegate throws a SpoolException subclass, it is re-thrown
as-is. Any other Exception is wrapped in a new
InboxReadException.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStream<software.spool.core.model.InboxItem>findByStatus(software.spool.core.model.InboxItemStatus status) Returns all inbox items matching the given status.static SafeInboxReaderof(InboxReader reader) Creates a newSafeInboxReaderwrapping the given delegate.
-
Constructor Details
-
SafeInboxReader
-
-
Method Details
-
findByStatus
public Stream<software.spool.core.model.InboxItem> findByStatus(software.spool.core.model.InboxItemStatus status) Description copied from interface:InboxReaderReturns all inbox items matching the given status.- Specified by:
findByStatusin interfaceInboxReader- Parameters:
status- the status to filter by; must not benull- Returns:
- a stream of matching inbox items
-
of
Creates a newSafeInboxReaderwrapping the given delegate.- Parameters:
reader- the reader to wrap; must not benull- Returns:
- a new
SafeInboxReaderinstance
-