org.apache.commons.lang3.event
Class EventListenerSupport.ProxyInvocationHandler

java.lang.Object
  extended by org.apache.commons.lang3.event.EventListenerSupport.ProxyInvocationHandler
All Implemented Interfaces:
InvocationHandler
Enclosing class:
EventListenerSupport<L>

protected class EventListenerSupport.ProxyInvocationHandler
extends Object
implements InvocationHandler

An invocation handler used to dispatch the event(s) to all the listeners.


Constructor Summary
protected EventListenerSupport.ProxyInvocationHandler()
           
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          Propagates the method call to all registered listeners in place of the proxy listener object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventListenerSupport.ProxyInvocationHandler

protected EventListenerSupport.ProxyInvocationHandler()
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Propagates the method call to all registered listeners in place of the proxy listener object.

Specified by:
invoke in interface InvocationHandler
Parameters:
proxy - the proxy object representing a listener on which the invocation was called.
method - the listener method that will be called on all of the listeners.
args - event arguments to propagate to the listeners.
Returns:
the result of the method call
Throws:
Throwable - if an error occurs


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.