[jboss-svn-commits] JBL Code SVN: r12660 - labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jun 18 15:47:28 EDT 2007


Author: kevin.conner at jboss.com
Date: 2007-06-18 15:47:28 -0400 (Mon, 18 Jun 2007)
New Revision: 12660

Added:
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java
Modified:
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java
   labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
Log:
Add wiretap implementations

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java	2007-06-18 19:46:40 UTC (rev 12659)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedRouter.java	2007-06-18 19:47:28 UTC (rev 12660)
@@ -21,181 +21,45 @@
  */
 package org.jboss.soa.esb.actions;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.message.mapping.ObjectMapper;
-import org.jboss.soa.esb.services.registry.Registry;
 import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.registry.RegistryFactory;
-import org.jboss.soa.esb.services.routing.MessageRouter;
 import org.jboss.soa.esb.services.routing.MessageRouterException;
-import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
 /**
  * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
  * @author kstam at jboss.com
  *
  */
-public class ContentBasedRouter extends AbstractActionPipelineProcessor
+public class ContentBasedRouter extends ContentBasedWiretap
 {
-  
-	public static final String ROUTE_TO_TAG      = "route-to";
-    public static final String OBJECT_PATH_TAG   = "object-path";
-    public static final String OBJECT_PATH       = "path";
-    public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
-	private Logger log = Logger.getLogger(this.getClass());
-
-	public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
-	{
-		_config = config;
-        checkMyParms();
-        _registry = RegistryFactory.getRegistry();
-        _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
-        _mapper = new ObjectMapper();
-	}
-    
-    public void initialise() 
-    {    
-        if (_destinations.size() < 1)
-        {
-            _logger
-                    .warn("Missing or empty destination list - This action class won't have any effect");
-        }
+    public ContentBasedRouter(ConfigTree config) throws ConfigurationException, RegistryException, MessageRouterException
+    {
+        super(config) ;
     }
-	/** Router the message to one or more destinations, using the ContentBasedRouter to figure out
+    /** Router the message to one or more destinations, using the ContentBasedRouter to figure out
      *  to which destinations it is going to be routed too.
      *  
      * @param message
      * @return Message
      * @throws ActionProcessingException
-	 */
-	public Message process(Message message) throws ActionProcessingException
-	{
-        try {
-            List<Object> objectList = _mapper.createObjectList(message, _messagePathList);
-            List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage, _ruleReload, message, objectList);
-            Collection<String[]> outgoingDestinations = new ArrayList<String[]>();
-    		for (String destination : destinations) {
-                if (_destinations.containsKey(destination)) {
-                    outgoingDestinations.add(_destinations.get(destination));
-                }
-    		}
-            if (outgoingDestinations.size()>0) {
-                MessageRouter.deliverMessages(outgoingDestinations, message); 
-            } else if (destinations.size() > 0) {
-                log.error("The rule destination(s) " + destinations 
-                        + " are  not in found in the destination names in the configuration "
-                        + _destinations.keySet() + ". Please fix your configuration.");
-               
-                MessageRouter.deliverMessage(MessageRouter.INTERNAL_SERVICE_CATEGORY
-                                           , MessageRouter.DEAD_LETTER_SERVICE_NAME
-                                           , message);
-            }
-    		return null;
-        } catch (MessageRouterException mre) {
-            throw new ActionProcessingException(mre.getMessage(), mre);
-        }
-	}
-    
+     */
+    public Message process(Message message) throws ActionProcessingException
+    {
+        super.process(message) ;
+        return null ;
+    }
+
     /** 
      * @deprecated no longer needed, leaving this in here for backwards compatibility,
      * use the default "process".
      * */
     public Message split(Message message) throws ActionProcessingException
     {
-        log.warn("Depricated, please use the default 'process' method in your configuration");
+        _logger.warn("Depricated, please use the default 'process' method in your configuration");
         return process(message);
     }
-    
-    /**
-     * Reading the piece of configTree specific to the CBR, and setting the configuration.
-     * 
-     * @throws ConfigurationException
-     */
-	protected void checkMyParms() throws ConfigurationException
-	{
-        if (_config.getAttribute(ListenerTagNames.RULE_SET_TAG)==null) {
-            _logger.error("Required attribute " + ListenerTagNames.RULE_SET_TAG + " not found in " + _config.getName() + ".");
-            throw new ConfigurationException("Required attribute" + ListenerTagNames.RULE_SET_TAG + " not found.");
-        } else {
-            _ruleSet =_config.getAttribute(ListenerTagNames.RULE_SET_TAG);
-            if (_ruleSet==null) {
-                throw new ConfigurationException("Required attribute " + ListenerTagNames.RULE_SET_TAG + " not found.");
-            }
-            _ruleLanguage =_config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
-            String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
-            if (ruleReload!=null && "true".equals(ruleReload)) {
-                _ruleReload = true;
-            }
-        }
-        if (_config.getAttribute(ListenerTagNames.CBR_CLASS)!=null) {
-            _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
-        } else {
-            _cbrClass = DEFAULT_CBR_CLASS;
-        }
-        
-		_destinations = new HashMap<String, String[]>();
-		ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
-		if (destList!=null) {
-    		for (ConfigTree curr : destList) {
-    			try
-    			{
-                    String key = curr.getRequiredAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
-    				String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
-    				String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
-    				_destinations.put(key, new String[] { category, name });
-    			}
-    			catch (Exception e)
-    			{
-    				throw new ConfigurationException(
-    						"Problems with destination list", e);
-    			}
-            }
-        }
-        _messagePathList = new ArrayList<String>();
-        ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
-        if (objectList!=null) {
-            for (ConfigTree curr : objectList) {
-                try {
-                    String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
-                    _messagePathList.add(objectPath);
-                } catch (Exception e) {
-                    throw new ConfigurationException(
-                            "Problems with object path list", e);
-                }
-            }
-        }
-        
-	}
 
-	protected ConfigTree _config;
-
-	protected Map<String, String[]> _destinations;
-    
-    protected String _cbrClass;
-    
-    protected String _ruleSet;
-    
-    protected String _ruleLanguage;
-    
-    protected boolean _ruleReload;
-    
-    protected List <String> _messagePathList; 
-    
-    protected ObjectMapper _mapper;
-
-	protected Registry _registry;
-    
-    protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
-
-	protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
-
+    protected static Logger _logger = Logger.getLogger(ContentBasedRouter.class);
 }

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java	2007-06-18 19:47:28 UTC (rev 12660)
@@ -0,0 +1,224 @@
+/*
+ * 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;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.message.mapping.ObjectMapper;
+import org.jboss.soa.esb.services.registry.Registry;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+import org.jboss.soa.esb.services.routing.cbr.ContentBasedRouterFactory;
+
+/**
+ * @author <a
+ *         href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author kstam at jboss.com
+ * @author kevin.conner at jboss.com
+ * 
+ */
+public class ContentBasedWiretap extends AbstractActionPipelineProcessor
+{
+    public static final String ROUTE_TO_TAG = "route-to";
+
+    public static final String OBJECT_PATH_TAG = "object-path";
+
+    public static final String OBJECT_PATH = "path";
+
+    public static final String DEFAULT_CBR_CLASS = "org.jboss.internal.soa.esb.services.routing.cbr.JBossRulesRouter";
+
+    public ContentBasedWiretap(ConfigTree config)
+        throws ConfigurationException, RegistryException,
+            MessageRouterException
+    {
+        _config = config;
+        checkMyParms();
+        _registry = RegistryFactory.getRegistry();
+        _cbr = ContentBasedRouterFactory.getRouter(_cbrClass);
+        _mapper = new ObjectMapper();
+    }
+
+    public void initialise()
+    {
+        if (_destinations.size() < 1)
+        {
+            _logger.warn("Missing or empty destination list - This action class won't have any effect");
+        }
+    }
+
+    /**
+     * Router the message to one or more destinations, using the
+     * ContentBasedRouter to figure out to which destinations it is going to be
+     * routed too.
+     * 
+     * @param message
+     * @return Message
+     * @throws ActionProcessingException
+     */
+    public Message process(Message message) throws ActionProcessingException
+    {
+        try
+        {
+            List<Object> objectList = _mapper.createObjectList(message, _messagePathList);
+            List<String> destinations = _cbr.route(_ruleSet, _ruleLanguage,
+                _ruleReload, message, objectList);
+            Collection<String[]> outgoingDestinations = new ArrayList<String[]>();
+            for (String destination : destinations)
+            {
+                if (_destinations.containsKey(destination))
+                {
+                    outgoingDestinations.add(_destinations.get(destination));
+                }
+            }
+            if (outgoingDestinations.size() > 0)
+            {
+                MessageRouter.deliverMessages(outgoingDestinations, message);
+            }
+            else if (destinations.size() > 0)
+            {
+                _logger.error("The rule destination(s) " + destinations
+                    + " are  not in found in the destination names in the configuration "
+                    + _destinations.keySet() + ". Please fix your configuration.");
+
+                MessageRouter.deliverMessage(MessageRouter.INTERNAL_SERVICE_CATEGORY,
+                    MessageRouter.DEAD_LETTER_SERVICE_NAME, message);
+            }
+            return message;
+        }
+        catch (MessageRouterException mre)
+        {
+            throw new ActionProcessingException(mre.getMessage(), mre);
+        }
+    }
+
+    /**
+     * Reading the piece of configTree specific to the CBR, and setting the
+     * configuration.
+     * 
+     * @throws ConfigurationException
+     */
+    protected void checkMyParms() throws ConfigurationException
+    {
+        if (_config.getAttribute(ListenerTagNames.RULE_SET_TAG) == null)
+        {
+            _logger.error("Required attribute " + ListenerTagNames.RULE_SET_TAG
+                + " not found in " + _config.getName() + ".");
+            throw new ConfigurationException("Required attribute"
+                + ListenerTagNames.RULE_SET_TAG + " not found.");
+        }
+        else
+        {
+            _ruleSet = _config.getAttribute(ListenerTagNames.RULE_SET_TAG);
+            if (_ruleSet == null)
+            {
+                throw new ConfigurationException("Required attribute "
+                    + ListenerTagNames.RULE_SET_TAG + " not found.");
+            }
+            _ruleLanguage = _config.getAttribute(ListenerTagNames.RULE_LANGUAGE_TAG);
+            String ruleReload = _config.getAttribute(ListenerTagNames.RULE_RELOAD_TAG);
+            if (ruleReload != null && "true".equals(ruleReload))
+            {
+                _ruleReload = true;
+            }
+        }
+        if (_config.getAttribute(ListenerTagNames.CBR_CLASS) != null)
+        {
+            _cbrClass = _config.getAttribute(ListenerTagNames.CBR_CLASS);
+        }
+        else
+        {
+            _cbrClass = DEFAULT_CBR_CLASS;
+        }
+
+        _destinations = new HashMap<String, String[]>();
+        ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
+        if (destList != null)
+        {
+            for (ConfigTree curr : destList)
+            {
+                try
+                {
+                    String key = curr.getRequiredAttribute(ListenerTagNames.DESTINATION_NAME_TAG);
+                    String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+                    String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+                    _destinations.put(key, new String[] { category, name });
+                }
+                catch (Exception e)
+                {
+                    throw new ConfigurationException("Problems with destination list", e);
+                }
+            }
+        }
+        _messagePathList = new ArrayList<String>();
+        ConfigTree[] objectList = _config.getChildren(OBJECT_PATH_TAG);
+        if (objectList != null)
+        {
+            for (ConfigTree curr : objectList)
+            {
+                try
+                {
+                    String objectPath = curr.getRequiredAttribute(OBJECT_PATH);
+                    _messagePathList.add(objectPath);
+                }
+                catch (Exception e)
+                {
+                    throw new ConfigurationException("Problems with object path list", e);
+                }
+            }
+        }
+
+    }
+
+    protected ConfigTree _config;
+
+    protected Map<String, String[]> _destinations;
+
+    protected String _cbrClass;
+
+    protected String _ruleSet;
+
+    protected String _ruleLanguage;
+
+    protected boolean _ruleReload;
+
+    protected List<String> _messagePathList;
+
+    protected ObjectMapper _mapper;
+
+    protected Registry _registry;
+
+    protected org.jboss.soa.esb.services.routing.cbr.ContentBasedRouter _cbr;
+
+    protected static Logger _logger = Logger.getLogger(ContentBasedWiretap.class);
+
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/ContentBasedWiretap.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native

Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java	2007-06-18 19:46:40 UTC (rev 12659)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticRouter.java	2007-06-18 19:47:28 UTC (rev 12660)
@@ -27,80 +27,37 @@
  */
 package org.jboss.soa.esb.actions;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.log4j.Logger;
 import org.jboss.soa.esb.ConfigurationException;
 import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.listeners.ListenerTagNames;
 import org.jboss.soa.esb.message.Message;
 import org.jboss.soa.esb.services.registry.RegistryException;
-import org.jboss.soa.esb.services.routing.MessageRouter;
-import org.jboss.soa.esb.services.routing.MessageRouterException;
 
-public class StaticRouter extends AbstractActionPipelineProcessor
+public class StaticRouter extends StaticWiretap
 {
-	public static final String ROUTE_TO_TAG = "route-to";
-    private Logger log = Logger.getLogger(this.getClass());
-
-	private StaticRouter(){}
-
-	public StaticRouter(ConfigTree config) throws ConfigurationException, RegistryException
-	{
-		_config = config;
-	}
-	/**
+    public StaticRouter(ConfigTree config) throws ConfigurationException, RegistryException
+    {
+            super(config) ;
+    }
+    
+    /**
      * Routes the message to one or more destonations.
-	 */
-	public Message process(Message message) throws ActionProcessingException
-	{
-		try {
-			MessageRouter.deliverMessages(_destinations, message);
-			return null;
-		} catch (MessageRouterException ex) {
-			throw new ActionProcessingException(ex);
-        }
-	}
+     */
+    public Message process(Message message) throws ActionProcessingException
+    {
+        super.process(message) ;
+        return null ;
+    }
+    
     /** 
      * @deprecated no longer needed, leaving this in here for backwards compatibility,
      * use the default "process".
      * */
     public Message split(Message message) throws ActionProcessingException 
     {
-        log.warn("Depricated, please use the default 'process' method in your configuration");
+        _logger.warn("Depricated, please use the default 'process' method in your configuration");
         return process(message);
     }
-    /**
-     * Initialization by reading the configuration.
-     */
-    public void initialise() throws ActionLifecycleException
-    {
-        _destinations = new ArrayList<String[]>();
-        ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
-        if (null == destList || destList.length < 1)
-        {
-        	_logger.warn("Missing or empty destination list - This action class won't have any effect");
-        	return;
-        }
-        for (ConfigTree curr : destList) {
-        	try {
-        		String category = curr.getAttribute(
-        				ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
-        		String name = curr.getRequiredAttribute(
-        				ListenerTagNames.SERVICE_NAME_TAG);
-        		_destinations.add(new String[]{ category, name});
-        	} catch (Exception e) {
-        		throw new ActionLifecycleException(
-        				"Problems with destination list", e);
-        	}
-        }
-    }
-
-	protected ConfigTree _config;
-
-	protected List<String[]> _destinations;
-
-	protected static Logger _logger = Logger.getLogger(StaticRouter.class);
-
+    
+    protected static Logger _logger = Logger.getLogger(StaticRouter.class);
 }

Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java	2007-06-18 19:47:28 UTC (rev 12660)
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+/**
+ * Routes the Message argument to a fixed list of services ([category,name]) 
+ * @author <a href="mailto:schifest at heuristica.com.ar">schifest at heuristica.com.ar</a>
+ * @author Kevin.Conner at jboss.com
+ * @since Version 4.0
+ */
+package org.jboss.soa.esb.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.helpers.ConfigTree;
+import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.message.Message;
+import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.routing.MessageRouter;
+import org.jboss.soa.esb.services.routing.MessageRouterException;
+
+public class StaticWiretap extends AbstractActionPipelineProcessor
+{
+    public static final String ROUTE_TO_TAG = "route-to";
+
+    public StaticWiretap(ConfigTree config) throws ConfigurationException,
+        RegistryException
+    {
+        _config = config;
+    }
+
+    /**
+     * Routes the message to one or more destinations, returning original message.
+     */
+    public Message process(Message message) throws ActionProcessingException
+    {
+        try
+        {
+            MessageRouter.deliverMessages(_destinations, message);
+            return message;
+        }
+        catch (MessageRouterException ex)
+        {
+            throw new ActionProcessingException(ex);
+        }
+    }
+
+    /**
+     * Initialization by reading the configuration.
+     */
+    public void initialise() throws ActionLifecycleException
+    {
+        _destinations = new ArrayList<String[]>();
+        ConfigTree[] destList = _config.getChildren(ROUTE_TO_TAG);
+        if (null == destList || destList.length < 1)
+        {
+            _logger.warn("Missing or empty destination list - This action class won't have any effect");
+            return;
+        }
+        for (ConfigTree curr : destList)
+        {
+            try
+            {
+                String category = curr.getAttribute(ListenerTagNames.SERVICE_CATEGORY_NAME_TAG, "");
+                String name = curr.getRequiredAttribute(ListenerTagNames.SERVICE_NAME_TAG);
+                _destinations.add(new String[] { category, name });
+            }
+            catch (Exception e)
+            {
+                throw new ActionLifecycleException("Problems with destination list", e);
+            }
+        }
+    }
+
+    protected ConfigTree _config;
+
+    protected List<String[]> _destinations;
+
+    protected static Logger _logger = Logger.getLogger(StaticRouter.class);
+}


Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/StaticWiretap.java
___________________________________________________________________
Name: svn:keywords
   + Rev Date
Name: svn:eol-style
   + native




More information about the jboss-svn-commits mailing list