1 10 11 package org.mule.model; 12 13 import org.mule.umo.model.UMOEntryPoint; 14 import org.mule.umo.UMOEventContext; 15 import org.mule.umo.lifecycle.Callable; 16 17 23 public class CallableEntryPoint implements UMOEntryPoint 24 { 25 public Class [] getParameterTypes() 26 { 27 return Callable.class.getMethods()[0].getParameterTypes(); 28 } 29 30 public Object invoke(Object component, UMOEventContext context) throws Exception 31 { 32 if (component instanceof Callable) 33 { 34 return ((Callable)component).onCall(context); 35 } 36 else 37 { 38 throw new NoSatisfiableMethodsException(component, UMOEventContext.class); 39 } 40 } 41 42 public boolean isVoid() 43 { 44 return false; 45 } 46 47 public String getMethodName() 48 { 49 return Callable.class.getMethods()[0].getName(); 50 } 51 } 52 | Popular Tags |