Improve Documentation in Code #24
@ -75,14 +75,15 @@ public final class EventBus {
|
|||||||
private final Map<Class<?>, TreeSet<EventHandler>> bindings = new ConcurrentHashMap<>();
|
private final Map<Class<?>, TreeSet<EventHandler>> bindings = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registered listeners.
|
* Stores all registered event listeners (which declare event handlers) and prevents them from
|
||||||
kske marked this conversation as resolved
Outdated
|
|||||||
|
* being garbage collected.
|
||||||
*
|
*
|
||||||
* @since 0.0.1
|
* @since 0.0.1
|
||||||
*/
|
*/
|
||||||
private final Set<Object> registeredListeners = ConcurrentHashMap.newKeySet();
|
private final Set<Object> registeredListeners = ConcurrentHashMap.newKeySet();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
kske marked this conversation as resolved
delvh
commented
The current event dispatching state for the current thread. The current event dispatching state for the current thread.
|
|||||||
* Thread-local dispatch state.
|
* The current event dispatching state, local to each thread.
|
||||||
*
|
*
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@ package dev.kske.eventbus.core;
|
|||||||
* This unchecked exception is specific to the event bus and can be thrown under the following
|
* This unchecked exception is specific to the event bus and can be thrown under the following
|
||||||
delvh
commented
I think it would be kinda funny to have an I think it would be kinda funny to have an `EventBusException` that `can be thrown under (the bus and) the following…`
|
|||||||
* circumstances:
|
* circumstances:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>An event handler throws an exception (which is stores as the cause)</li>
|
* <li>An event handler throws an exception (which is stored as the cause)</li>
|
||||||
kske marked this conversation as resolved
Outdated
delvh
commented
it Alternatively: it
Alternatively:
stored
|
|||||||
* <li>An event listener with an invalid event handler is registered</li>
|
* <li>An event listener with an invalid event handler is registered</li>
|
||||||
* <li>{@link EventBus#cancel()} is invoked from outside an active dispatch thread</li>
|
* <li>{@link EventBus#cancel()} is invoked from outside an active dispatch thread</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user
Stores all registered listeners. Additionally prevents them from being garbage collected.