[jboss-svn-commits] JBL Code SVN: r7302 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Nov 1 18:10:36 EST 2006
Author: jokum
Date: 2006-11-01 18:10:34 -0500 (Wed, 01 Nov 2006)
New Revision: 7302
Added:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java
Log:
Added an EchoRouter handy for debugging orchestrations
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java 2006-11-01 23:08:40 UTC (rev 7301)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/routing/EchoRouter.java 2006-11-01 23:10:34 UTC (rev 7302)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.soa.esb.actions.routing;
+
+import java.io.Serializable;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.actions.ActionProcessingException;
+import org.jboss.soa.esb.actions.ActionProcessor;
+import org.jboss.soa.esb.actions.ActionUtils;
+import org.jboss.soa.esb.helpers.ConfigTree;
+
+/**
+ * Echo Action Processor.
+ *
+ * <p/> Sample Action Configuration:
+ *
+ * <pre>
+ * <Action class="org.jboss.soa.esb.actions.routing.EchoRouter"></Action>
+ * </pre>
+ *
+ * @author <a href="mailto:johan.kumps at telenet.be">Johan Kumps</a>
+ */
+public class EchoRouter implements ActionProcessor {
+
+ /* The logger for this class */
+ private static Logger logger = Logger.getLogger(EchoRouter.class);
+
+ public EchoRouter (ConfigTree configTree){
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.soa.esb.actions.ActionProcessor#process(java.lang.Object)
+ */
+ public org.jboss.soa.esb.message.Message process(
+ org.jboss.soa.esb.message.Message message)
+ throws ActionProcessingException {
+
+ if (logger.isInfoEnabled()) {
+ logger.info("EchoRouter currently routing message " + message + " with payload <<" + ActionUtils.getTaskObject(message) + ">>");
+ }
+
+ return message;
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.soa.esb.actions.ActionProcessor#getOkNotification(java.lang.Object)
+ */
+ public Serializable getOkNotification(
+ org.jboss.soa.esb.message.Message message) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.soa.esb.actions.ActionProcessor#getErrorNotification(java.lang.Object)
+ */
+ public Serializable getErrorNotification(
+ org.jboss.soa.esb.message.Message message) {
+ return null;
+ }
+
+}
More information about the jboss-svn-commits
mailing list