[jboss-svn-commits] JBL Code SVN: r9652 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/jbpm.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Feb 20 09:18:21 EST 2007
Author: estebanschifman
Date: 2007-02-20 09:18:21 -0500 (Tue, 20 Feb 2007)
New Revision: 9652
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/jbpm/CommandInterpreter.java
Log:
defaultReply(Message) method added for standard replies to invoker
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/jbpm/CommandInterpreter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/jbpm/CommandInterpreter.java 2007-02-20 14:14:58 UTC (rev 9651)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/jbpm/CommandInterpreter.java 2007-02-20 14:18:21 UTC (rev 9652)
@@ -27,6 +27,9 @@
import org.apache.log4j.Logger;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.couriers.Courier;
+import org.jboss.soa.esb.couriers.CourierFactory;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.util.jbpm.CommandVehicle;
@@ -49,8 +52,6 @@
*/
public class CommandInterpreter
{
-
-
private CommandInterpreter() {}
public CommandInterpreter(ConfigTree config) throws ConfigurationException
{
@@ -58,6 +59,28 @@
checkMyParms();
} // ________________________________
+ /**
+ * If configuration of current action speficied "okMethod=defaultReply" in the <action> element,
+ * then the ActionProcessingPipeline will invoke this method upon normal return from invocation to
+ * the process method.
+ * <br/>Typically you would configure as follows:
+ * <br/>
+ * <action class=org.jboss.soa.esb.actions.jbpm.CommandInterpreter okMethod=defaultReply />
+ * @param message - Containing payload and replyToEpr where to send the reply.
+ * @throws Exception
+ */
+ public void defaultReply(Message message) throws Exception
+ {
+ EPR reply = message.getHeader().getCall().getReplyTo();
+ if (null==reply)
+ {
+ _logger.error("Null replyToEPR in message");
+ return;
+ }
+ Courier courier = CourierFactory.getCourier(reply);
+ courier.deliver(message);
+ } // ________________________________
+
public Message process(Message message)
{
_command = new CommandVehicle(message);
@@ -292,7 +315,11 @@
return retMap;
} //________________________________
-
+ /**
+ * Should this class need any extra configuration, this is the placeholder where to check
+ * if configuration is OK.
+ * @throws ConfigurationException
+ */
protected void checkMyParms() throws ConfigurationException
{
} // _______________________________
More information about the jboss-svn-commits
mailing list