Index
All Classes and Interfaces|All Packages
A
- add(Class<T>, Consumer<? super ListenerFactory<K, T, O>>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber.BulkSubscriber
-
Adds a new listener for the specified event.
- add(Class<T>, K, Consumer<? super T>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber.BulkSubscriber
-
Adds a new listener for the specified event.
- add(Class<T>, K, Consumer<? super T>, O) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber.BulkSubscriber
-
Adds a new listener for the specified event.
- allListeners() - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Gets all existing
SubscribedListener
s. - asyncCaller(EventCaller<E>, Executor) - Static method in interface dev.siroshun.event4j.api.caller.EventCaller
B
- BREAK - Enum constant in enum class dev.siroshun.event4j.api.listener.ListenerExceptionHandler.Result
-
A
ListenerExceptionHandler.Result
that indicates that theEventCaller
should not post the event to subsequent listeners. - bulkSubscriber() - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Creates a new
ListenerSubscriber.BulkSubscriber
for subscribing multiple listeners at once.
C
- call(E) - Method in interface dev.siroshun.event4j.api.caller.EventCaller
-
Calls the event.
- call(T, Consumer<? super T>) - Method in interface dev.siroshun.event4j.api.caller.EventCaller
-
Calls the event.
- caller() - Method in interface dev.siroshun.event4j.tree.TreeEventService
-
Gets the
EventCaller
of thisTreeEventService
. - COMPARATOR - Static variable in record class dev.siroshun.event4j.api.priority.Priority
-
A
Comparator
to compare twoPriority
. - compareTo(Priority) - Method in record class dev.siroshun.event4j.api.priority.Priority
- consumer() - Method in interface dev.siroshun.event4j.api.listener.SubscribedListener
-
Gets the
Consumer
of this listener. - consumer(Consumer<? super E>) - Method in interface dev.siroshun.event4j.api.listener.ListenerFactory
-
Sets the
Consumer
. - CONTINUE - Enum constant in enum class dev.siroshun.event4j.api.listener.ListenerExceptionHandler.Result
-
A
ListenerExceptionHandler.Result
that indicates that theEventCaller
should post the event to subsequent listeners. - continueHandler() - Static method in interface dev.siroshun.event4j.api.listener.ListenerExceptionHandler
-
Creates a
ListenerExceptionHandler
that returnsListenerExceptionHandler.Result.CONTINUE
. - create() - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Creates a new
TreeEventService
withListenerExceptionHandler.continueHandler()
. - create(ListenerExceptionHandler<K, E, O>) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Creates a new
TreeEventService
with the customListenerExceptionHandler
.
D
- defaultOrder(O1) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Sets the
Comparator
and the default order. - dev.siroshun.event4j.api.caller - package dev.siroshun.event4j.api.caller
-
A package for interfaces that call events.
- dev.siroshun.event4j.api.listener - package dev.siroshun.event4j.api.listener
-
A package of the listener related interfaces.
- dev.siroshun.event4j.api.priority - package dev.siroshun.event4j.api.priority
-
A package for
Priority
. - dev.siroshun.event4j.tree - package dev.siroshun.event4j.tree
-
A package of "tree" implementation of Event4J.
E
- equals(Object) - Method in record class dev.siroshun.event4j.api.priority.Priority
-
Indicates whether some other object is "equal to" this one.
- EventCaller<E> - Interface in dev.siroshun.event4j.api.caller
-
An interface to call events.
- eventClass() - Method in interface dev.siroshun.event4j.api.listener.SubscribedListener
-
Gets the event class of this listener.
- eventClass(Class<? extends E1>) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Sets the root event class.
F
- factory() - Static method in interface dev.siroshun.event4j.tree.TreeEventService
-
Creates a new
TreeEventService.Factory
.
H
- handleException(E, SubscribedListener<K, ? extends E, O>, Throwable) - Method in interface dev.siroshun.event4j.api.listener.ListenerExceptionHandler
-
Handles the exception.
- hashCode() - Method in record class dev.siroshun.event4j.api.priority.Priority
-
Returns a hash code value for this object.
- HIGH - Static variable in record class dev.siroshun.event4j.api.priority.Priority
-
Priority value: 64
K
- key() - Method in interface dev.siroshun.event4j.api.listener.SubscribedListener
-
Gets the key of this listener.
- key(K) - Method in interface dev.siroshun.event4j.api.listener.ListenerFactory
-
Sets the key.
- keyClass(Class<? extends K1>) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Sets the key class.
L
- ListenerExceptionHandler<K,
E, O> - Interface in dev.siroshun.event4j.api.listener -
An interface to handle the exception that is thrown from
SubscribedListener.consumer()
. - ListenerExceptionHandler.Result - Enum Class in dev.siroshun.event4j.api.listener
-
The operations that indicates what the
EventCaller
should do next - ListenerFactory<K,
E, O> - Interface in dev.siroshun.event4j.api.listener -
An interface to create/subscribe a listener.
- listenersFor(Class<T>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Gets the existing
SubscribedListener
s for the specified event. - ListenerSubscriber<K,
E, O> - Interface in dev.siroshun.event4j.api.listener -
An interface to subscribe/unsubscribe listeners.
- ListenerSubscriber.BulkSubscriber<K,
E, O> - Interface in dev.siroshun.event4j.api.listener -
An interface for subscribing multiple listeners at once.
- LOW - Static variable in record class dev.siroshun.event4j.api.priority.Priority
-
Priority value: -64
N
- NORMAL - Static variable in record class dev.siroshun.event4j.api.priority.Priority
-
Priority value: 0
O
- order() - Method in interface dev.siroshun.event4j.api.listener.SubscribedListener
-
Gets the order of this listener.
- order(O) - Method in interface dev.siroshun.event4j.api.listener.ListenerFactory
-
Sets the order.
- orderComparator(Comparator<? super O1>) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Sets the
Comparator
to sort listeners by the specified orders. - orderComparator(Comparator<? super O1>, O1) - Method in interface dev.siroshun.event4j.tree.TreeEventService.Factory
-
Sets the
Comparator
and the default order.
P
- Priority - Record Class in dev.siroshun.event4j.api.priority
-
An interface to set the listener's priority.
- Priority(int) - Constructor for record class dev.siroshun.event4j.api.priority.Priority
-
Creates an instance of a
Priority
record class.
R
- RETHROW - Enum constant in enum class dev.siroshun.event4j.api.listener.ListenerExceptionHandler.Result
-
A
ListenerExceptionHandler.Result
that indicates thatEventCaller
should re-throw an exception.
S
- subscribe() - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber.BulkSubscriber
-
Subscribes added listeners.
- subscribe(Class<T>, Consumer<? super ListenerFactory<K, T, O>>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Subscribes a new listener for the specified event.
- subscribe(Class<T>, K, Consumer<? super T>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Subscribes a new listener for the specified event.
- subscribe(Class<T>, K, Consumer<? super T>, O) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Subscribes a new listener for the specified event.
- SubscribedListener<K,
E, O> - Interface in dev.siroshun.event4j.api.listener -
An interface to hold the subscribed listener.
- subscriber() - Method in interface dev.siroshun.event4j.tree.TreeEventService
-
Gets the
ListenerSubscriber
of thisTreeEventService
.
T
- toString() - Method in record class dev.siroshun.event4j.api.priority.Priority
-
Returns a string representation of this record class.
- TreeEventService<K,
E, O> - Interface in dev.siroshun.event4j.tree -
An interface for retrieving an instance of
EventCaller
andListenerSubscriber
. - TreeEventService.Factory<K,
E, O> - Interface in dev.siroshun.event4j.tree -
A factory interface to create
TreeEventService
.
U
- unsubscribe(SubscribedListener<K, ? extends E, O>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Unsubscribes the specified
SubscribedListener
. - unsubscribeAll(Collection<SubscribedListener<K, ? extends E, O>>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Unsubscribes the specified
SubscribedListener
s. - unsubscribeByKey(K) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Unsubscribes listeners by the specified key.
- unsubscribeIf(Predicate<SubscribedListener<K, ? extends E, O>>) - Method in interface dev.siroshun.event4j.api.listener.ListenerSubscriber
-
Unsubscribes all listeners that satisfy the given
Predicate
.
V
- value() - Method in record class dev.siroshun.event4j.api.priority.Priority
-
Returns the value of the
value
record component. - value(int) - Static method in record class dev.siroshun.event4j.api.priority.Priority
-
Creates a new priority.
- valueOf(String) - Static method in enum class dev.siroshun.event4j.api.listener.ListenerExceptionHandler.Result
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class dev.siroshun.event4j.api.listener.ListenerExceptionHandler.Result
-
Returns an array containing the constants of this enum class, in the order they are declared.
All Classes and Interfaces|All Packages