final class SynchronizedEventSubscriber extends EventSubscriber
Beyond synchronization, this class behaves identically to
EventSubscriber.
| Constructor and Description |
|---|
SynchronizedEventSubscriber(java.lang.Object target,
java.lang.reflect.Method method)
Creates a new SynchronizedEventSubscriber to wrap
method on
target. |
| Modifier and Type | Method and Description |
|---|---|
void |
handleEvent(java.lang.Object event)
Invokes the wrapped subscriber method to handle
event. |
equals, getMethod, getSubscriber, hashCode, toStringpublic SynchronizedEventSubscriber(java.lang.Object target,
java.lang.reflect.Method method)
method on
target.target - object to which the method applies.method - subscriber method.public void handleEvent(java.lang.Object event)
throws java.lang.reflect.InvocationTargetException
EventSubscriberevent.handleEvent in class EventSubscriberevent - event to handlejava.lang.reflect.InvocationTargetException - if the wrapped method throws any
Throwable that is not an Error (Error instances are
propagated as-is).