org.viewaframework.controller
Class GenericListenerHandler<EL extends EventListener,EO extends EventObject>

java.lang.Object
  extended by org.viewaframework.controller.GenericListenerHandler<EL,EO>
All Implemented Interfaces:
InvocationHandler, ListenerProxy<EL,EO>

public class GenericListenerHandler<EL extends EventListener,EO extends EventObject>
extends Object
implements ListenerProxy<EL,EO>

This method redirects the method calls from the proxied listeners to the ViewController methods.

Since:
1.0
Author:
Mario Garcia

Constructor Summary
GenericListenerHandler(ViewContainer view, ViewController<EL,EO> viewController)
          The handler needs to know the parameters of the final method.
 
Method Summary
 ViewController<EL,EO> getTargetController()
          Returns the listener the proxy is carrying.
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericListenerHandler

public GenericListenerHandler(ViewContainer view,
                              ViewController<EL,EO> viewController)
The handler needs to know the parameters of the final method.

Parameters:
view - The view is the first argument of the target controller
viewController - The target controller.
Method Detail

getTargetController

public ViewController<EL,EO> getTargetController()
Description copied from interface: ListenerProxy
Returns the listener the proxy is carrying.

Specified by:
getTargetController in interface ListenerProxy<EL extends EventListener,EO extends EventObject>
Returns:

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2010. All Rights Reserved.