public final class EventListenerUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends EventListener> |
proxyWrapper(Class<T> listenerType,
ClassLoader loader,
Iterable<? extends T> listeners)
Provides proxy wrapper around an
Iterable container of listener
interface implementation. |
static <T extends EventListener> |
proxyWrapper(Class<T> listenerType,
Iterable<? extends T> listeners)
Provides proxy wrapper around an
Iterable container of listener
interface implementation. |
public static <T extends EventListener> T proxyWrapper(Class<T> listenerType, Iterable<? extends T> listeners)
Iterable container of listener
interface implementation. Note: a listener interface is one whose
invoked methods return only void.T - Generic listener typelistenerType - The expected listener interfacelisteners - An Iterable container of listeners to be invoked.
Note(s):
The invocation order is same as the Iterable container
If any of the invoked listener methods throws an exception, the rest of the listener are not invoked and the exception is propagated to the caller
It is up to the caller to ensure that the container does not change while the proxy is invoked
proxyWrapper(Class, ClassLoader, Iterable)public static <T extends EventListener> T proxyWrapper(Class<T> listenerType, ClassLoader loader, Iterable<? extends T> listeners)
Iterable container of listener
interface implementation. Note: a listener interface is one whose
invoked methods return only void.T - Generic listener typelistenerType - The expected listener interfaceloader - The ClassLoader to use for the proxylisteners - An Iterable container of listeners to be invoked.
Note(s):
The invocation order is same as the Iterable container
If any of the invoked listener methods throws an exception, the rest of the listener are not invoked and the exception is propagated to the caller
It is up to the caller to ensure that the container does not change while the proxy is invoked
IllegalArgumentException - if listenerType is not an interface
or a null container has been providedproxyWrapper(Class, ClassLoader, Iterable)Copyright © 2008–2015 The Apache Software Foundation. All rights reserved.