1 10 11 package org.mule.extras.client; 12 13 import org.mule.config.MuleProperties; 14 import org.mule.transformers.AbstractTransformer; 15 import org.mule.umo.UMOMessage; 16 import org.mule.umo.transformer.TransformerException; 17 18 import java.lang.reflect.Method ; 19 20 27 28 public abstract class AbstractEventTransformer extends AbstractTransformer 29 { 30 protected AbstractEventTransformer() 31 { 32 setReturnClass(UMOMessage.class); 33 } 34 35 public UMOMessage transform(Object src, Method method) throws TransformerException 36 { 37 UMOMessage message = (UMOMessage)transform(src); 38 message.setProperty(MuleProperties.MULE_METHOD_PROPERTY, method.getName()); 39 return message; 40 } 41 } 42 | Popular Tags |