public FunctionalTestNotification(UMOEventContext context, Object replyMessage, int action) throws TransformerException { super(context.getTransformedMessage(), action); resourceIdentifier = context.getComponentDescriptor().getName(); this.replyMessage = replyMessage; this.eventContext = context; }
/** * Passes the context to the listener * * @param context the context ot process * @return Object this object can be anything. When the <code>UMOLifecycleAdapter</code> for the * components receives this object it will first see if the Object is an <code>UMOEvent</code> * if not and the Object is not null a new context will be created using the returned object * as the payload. This new context will then get published to the configured outbound * endpoint if- * <ol> * <li>One has been configured for the UMO. * <li>the <code>setStopFurtherProcessing(true)</code> wasn't called on the previous * context. * </ol> * * @throws Exception if the context fails to process properly. If exceptions aren't handled by the * implementation they will be handled by the exceptionListener associated with the components */ public Object onCall(UMOEventContext context) throws Exception { if (methodName.equals(DEFAULT_METHOD_NAME)) { return component.invokeMethod(getMethodName(), context); } else { Object msg = context.getTransformedMessage(); return component.invokeMethod(getMethodName(), msg); } }
/** * This is the callback method used by Mule to give Mule events to this Multicaster * * @param context the context received by Mule */ public void onMuleEvent(UMOEventContext context) throws TransformerException, MalformedEndpointException { multicastEvent( new MuleApplicationEvent(context.getTransformedMessage(), context, applicationContext)); context.setStopFurtherProcessing(true); }