1 15 package org.apache.tapestry.listener; 16 17 import org.apache.hivemind.util.Defense; 18 import org.apache.tapestry.IActionListener; 19 import org.apache.tapestry.IComponent; 20 import org.apache.tapestry.IRequestCycle; 21 22 34 public class SyntheticListener implements IActionListener 35 { 36 private final Object _target; 37 38 private final ListenerMethodInvoker _invoker; 39 40 public SyntheticListener(Object target, ListenerMethodInvoker invoker) 41 { 42 Defense.notNull(target, "target"); 43 Defense.notNull(invoker, "invoker"); 44 45 _target = target; 46 _invoker = invoker; 47 } 48 49 public void actionTriggered(IComponent component, IRequestCycle cycle) 50 { 51 _invoker.invokeListenerMethod(_target, cycle); 52 } 53 } | Popular Tags |