Class DefaultPublishedEvents
java.lang.Object
org.springframework.modulith.test.DefaultPublishedEvents
- All Implemented Interfaces:
EventListener,ApplicationListener<ApplicationEvent>,PublishedEvents,TypedEvents
class DefaultPublishedEvents
extends Object
implements PublishedEvents, ApplicationListener<ApplicationEvent>
Default implementation of
PublishedEvents.- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.modulith.test.PublishedEvents
PublishedEvents.TypedPublishedEvents<T> -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new, emptyDefaultPublishedEventsinstance.DefaultPublishedEvents(Collection<? extends Object> events) Creates a newDefaultPublishedEventsinstance with the given events. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.modulith.test.TypedEvents
eventOfTypeWasPublished
-
Constructor Details
-
DefaultPublishedEvents
DefaultPublishedEvents()Creates a new, emptyDefaultPublishedEventsinstance. -
DefaultPublishedEvents
DefaultPublishedEvents(Collection<? extends Object> events) Creates a newDefaultPublishedEventsinstance with the given events.- Parameters:
events- must not be null.
-
-
Method Details
-
onApplicationEvent
- Specified by:
onApplicationEventin interfaceApplicationListener<ApplicationEvent>
-
ofType
Description copied from interface:TypedEventsReturns all events of the given type.- Specified by:
ofTypein interfacePublishedEvents- Specified by:
ofTypein interfaceTypedEvents- Type Parameters:
T- the event type- Parameters:
type- must not be null.- Returns:
-
toString
-