Interface LifecycleEventType<O extends LifecycleEventOwner,E extends LifecycleEvent,C extends LifecycleEventHandlerConfiguration<O>>
- Type Parameters:
O
- the required owner typeE
- the event object typeC
- the configuration type
- All Known Subinterfaces:
LifecycleEventType.Monitorable<O,
,E> LifecycleEventType.Prioritizable<O,
,E> RegistryEntryAddEventType<T,
B>
@Experimental
@NullMarked
@NonExtendable
public interface LifecycleEventType<O extends LifecycleEventOwner,E extends LifecycleEvent,C extends LifecycleEventHandlerConfiguration<O>>
Base type for all types of lifecycle events. Differs from
LifecycleEvent
which is the actual event object, whereas
this is an object representing the type of the event. Used
to construct subtypes of LifecycleEventHandlerConfiguration
for
use in LifecycleEventManager
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
LifecycleEventType.Monitorable<O extends LifecycleEventOwner,
E extends LifecycleEvent> Lifecycle event type that supports separate registration of handlers as "monitors" that are run last.static interface
LifecycleEventType.Prioritizable<O extends LifecycleEventOwner,
E extends LifecycleEvent> Lifecycle event type that supports both"monitors"
and specific numeric-based priorities. -
Method Summary
Modifier and TypeMethodDescriptionname()
Gets the name of the lifecycle event.newHandler
(LifecycleEventHandler<? super E> handler) Create a configuration for this event with the specified handler.
-
Method Details
-
name
Gets the name of the lifecycle event.- Returns:
- the name
-
newHandler
Create a configuration for this event with the specified handler.- Parameters:
handler
- the event handler- Returns:
- a new configuration
- See Also:
-