| Package | Description |
|---|---|
| de.skuzzle.jeve |
This package defines the main public API of jeve. jeve is an open source
framework for implementing the observer pattern in Java 8 .
|
| de.skuzzle.jeve.invoke |
Contains abstractions for invoking methods on listeners.
|
| de.skuzzle.jeve.providers |
Contains actual implementations of
EventProviders. |
| de.skuzzle.jeve.stores |
Contains actual implementations of
ListenerStores. |
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultTargetEvent<T,S extends Event<?,L>,L extends Listener>
Deprecated.
Since 3.0.0 - use
DefaultDispatchable instead. |
class |
Event<T,L extends Listener>
This class is the base of all events that can be fired.
|
class |
SequentialEvent<T,L extends Listener>
Specialized Event for use with
SynchronousEventProviders. |
| Modifier and Type | Method and Description |
|---|---|
<L extends Listener> |
ListenerStore.add(Class<L> listenerClass,
L listener)
Adds a listener which will be notified for every event represented by the
given listener class.
|
<L extends Listener> |
ListenerStore.add(L listener)
Adds the given object for all listener classes it implements.
|
static <L extends Listener,E extends Event<?,L>> |
EventStackHelper.checkPrevent(EventStack eventStack,
E event,
BiConsumer<L,E> bc,
ExceptionCallback ec)
Checks whether the given Event should be prevented according to the given
event stack.
|
<L extends Listener> |
ListenerStore.clearAll(Class<L> listenerClass)
Removes all listeners which have been registered for the provided
listener class.
|
<L extends Listener,E extends DefaultDispatchable> |
EventProvider.dispatch(DefaultDispatchable event)
Dispatches the given event by calling its
DefaultDispatchable.defaultDispatch(EventProvider, ExceptionCallback)
method, passing this as first argument and the currently set
ExceptionCallback as second argument. |
default <L extends Listener,E extends DefaultTargetEvent<?,E,L>> |
EventProvider.dispatch(E event)
Deprecated.
Since 3.0.0 - Use
EventProvider.dispatch(DefaultDispatchable)
instead. |
<L extends Listener,E extends Event<?,L>> |
EventProvider.dispatch(E event,
BiConsumer<L,E> bc)
Notifies all listeners of a certain kind about an occurred event.
|
<L extends Listener,E extends Event<?,L>> |
EventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec)
Notifies all listeners of a certain kind about an occurred event with
explicit error handling.
|
default <L extends Listener,E extends DefaultTargetEvent<?,E,L>> |
EventProvider.dispatch(E event,
ExceptionCallback ec)
Deprecated.
Since 3.0.0 - Use
EventProvider.dispatch(DefaultDispatchable, ExceptionCallback)
instead. |
<L extends Listener> |
ListenerStore.get(Class<L> listenerClass)
Gets all listeners that have been registered using
ListenerStore.add(Class, Listener) for the given listener class. |
<E extends Listener> |
SequentialEvent.preventCascade(Class<E> listenerClass)
Prevents to dispatch events to the given listener class while this event
is being dispatched.
|
<L extends Listener> |
ListenerStore.remove(Class<L> listenerClass,
L listener)
Removes a listener.
|
<L extends Listener> |
ListenerStore.remove(L listener)
Removes the given object for all listener classes it implements.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Listener> |
RegistrationEvent.getEventClass()
Gets the class for which the Listener has been added or removed.
|
Class<? extends Listener> |
SuppressedEvent.getListenerClass()
The listener class of the suppressed event.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
ExceptionCallback.exception(Exception e,
Listener source,
Event<?,?> event)
Deprecated.
Since 3.0.0 - use
ExceptionCallback.exception(FailedEventInvocation)
instead. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
EventStack.isActive(Class<? extends Listener> listenerClass)
Determines whether an Event is being dispatched for the given listener
class.
|
boolean |
EventStack.isAnyActive(Collection<? extends Class<? extends Listener>> c)
Determines whether an Event is being dispatched for at least one listener
class contained in the given collection.
|
Optional<SequentialEvent<?,?>> |
EventStack.preventDispatch(Class<? extends Listener> listenerClass)
Checks whether dispatch for events with the given event should be
prevented.
|
| Constructor and Description |
|---|
RegistrationEvent(ListenerStore source,
Class<? extends Listener> cls)
Creates a new RegistrationEvent.
|
| Modifier and Type | Method and Description |
|---|---|
static <L extends Listener,E extends Event<?,L>> |
EventInvocation.of(L listener,
E event,
BiConsumer<L,E> method,
ExceptionCallback ec)
Creates a new EventInvocation.
|
| Modifier and Type | Method and Description |
|---|---|
Listener |
EventInvocation.getListener()
Gets the listener which is notified.
|
| Modifier and Type | Method and Description |
|---|---|
protected <L extends Listener,E extends Event<?,?>> |
AbstractEventProvider.checkDispatchArgs(E event,
Object bc,
ExceptionCallback ec)
Helper method which serves for throwing
IllegalArgumentException
if any of the passed arguments is null. |
protected <L extends Listener,E extends Event<?,L>> |
AbstractEventProvider.createInvocation(L listener,
E event,
BiConsumer<L,E> bc,
ExceptionCallback ec)
Creates a new
EventInvocation object for dispatching the given event to
the given listener. |
<L extends Listener,E extends Event<?,L>> |
StatisticsEventProvider.dispatch(E event,
BiConsumer<L,E> bc) |
<L extends Listener,E extends Event<?,L>> |
AbstractEventProvider.dispatch(E event,
BiConsumer<L,E> bc) |
<L extends Listener,E extends Event<?,L>> |
StatisticsEventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
<L extends Listener,E extends Event<?,L>> |
ParallelEventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
<L extends Listener,E extends Event<?,L>> |
AWTEventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
<L extends Listener,E extends Event<?,L>> |
AsynchronousEventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
<L extends Listener,E extends Event<?,L>> |
AbstractEventProvider.dispatch(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
protected <L extends Listener,E extends Event<?,L>> |
UnrollingEventProvider.notifyListeners(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
protected <L extends Listener,E extends Event<?,L>> |
SequentialEventProvider.notifyListeners(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec) |
protected <L extends Listener,E extends Event<?,L>> |
AbstractEventProvider.notifyListeners(E event,
BiConsumer<L,E> bc,
ExceptionCallback ec)
Notifies all listeners registered for the provided class with the
provided event.
|
protected <L extends Listener,E extends Event<?,L>> |
AbstractEventProvider.notifySingle(L listener,
E event,
BiConsumer<L,E> bc,
ExceptionCallback ec)
Notifies a single listener and internally handles exceptions using the
ExceptionCallback. |
| Modifier and Type | Method and Description |
|---|---|
Map<Class<? extends Listener>,Integer> |
StatisticsEventProvider.getNotificationStatistics()
Gets a map containing statistics about how often a certain kind of
listener has been notified.
|
| Modifier and Type | Method and Description |
|---|---|
<L extends Listener> |
AbstractSynchronizedListenerStore.add(Class<L> listenerClass,
L listener) |
<T extends Listener> |
PriorityListenerStore.add(Class<T> listenerClass,
T listener)
Adds a listener with the default priority specified in the constructor.
|
<T extends Listener> |
PriorityListenerStore.add(Class<T> listenerClass,
T listener,
int priority)
Adds a listener with the given priority.
|
<L extends Listener> |
AbstractSynchronizedListenerStore.add(L listener) |
<T extends Listener> |
AbstractListenerStore.add(T listener) |
<L extends Listener> |
AbstractSynchronizedListenerStore.clearAll(Class<L> listenerClass) |
protected <T extends Listener> |
AbstractListenerStore.copyList(Class<T> listenerClass,
Stream<Object> listeners,
int sizeHint)
Creates a collection from the given stream, casting each object to the
provided listener class.
|
<L extends Listener> |
AbstractSynchronizedListenerStore.get(Class<L> listenerClass) |
<L extends Listener> |
AbstractSynchronizedListenerStore.remove(Class<L> listenerClass,
L listener) |
<L extends Listener> |
AbstractSynchronizedListenerStore.remove(L listener) |
<T extends Listener> |
AbstractListenerStore.remove(T listener) |
Copyright © 2014–2015. All rights reserved.