1 17 package org.apache.servicemix.components.reflection; 18 19 import java.lang.reflect.Method ; 20 21 import javax.jbi.messaging.MessageExchange; 22 import javax.jbi.messaging.NormalizedMessage; 23 24 import org.apache.servicemix.components.util.OutBinding; 25 26 31 public class ReflectionOutBinding extends OutBinding { 32 33 private Object target; 34 35 public Object getTarget() { 36 return target; 37 } 38 public void setTarget(Object target) { 39 this.target = target; 40 } 41 42 protected void process(MessageExchange messageExchange, NormalizedMessage inMessage) throws Exception { 45 46 Method method = (Method ) inMessage.getProperty("method"); 47 Object []args = (Object []) inMessage.getProperty("args"); 48 method.invoke(target, args); 49 done(messageExchange); 50 } 51 } 52 | Popular Tags |