OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | joram-commits List | April 2010 Index

<--  Date Index  --> <--  Thread Index  -->

[[joram-commits]] [3798] trunk/joram/src/org/objectweb/joram/client/connector:Consideration of the interceptors for the managed connection factory.


Title: [3798] trunk/joram/src/org/objectweb/joram/client/connector: Consideration of the interceptors for the managed connection factory.
Revision
3798
Author
tachker
Date
2010-04-21 17:33:26 +0200 (Wed, 21 Apr 2010)

Log Message

Consideration of the interceptors for the managed connection factory.

Modified Paths

Diff

Modified: trunk/joram/src/org/objectweb/joram/client/connector/ManagedConnectionFactoryImpl.java (3797 => 3798)


--- trunk/joram/src/org/objectweb/joram/client/connector/ManagedConnectionFactoryImpl.java	2010-04-13 15:55:06 UTC (rev 3797)
+++ trunk/joram/src/org/objectweb/joram/client/connector/ManagedConnectionFactoryImpl.java	2010-04-21 15:33:26 UTC (rev 3798)
@@ -25,6 +25,7 @@
 package org.objectweb.joram.client.connector;
 
 import java.io.PrintWriter;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Set;
 
@@ -145,8 +146,18 @@
    * This is the local IP address port on which the TCP connection is activated
    */
   public int outLocalPort = 0;
+  
+  /**
+   * Comma separated list of IN interceptors.
+   */
+  private String inInterceptors = null;
 
   /**
+   * Comma separated list of OUT interceptors.
+   */
+  private String outInterceptors = null;
+
+  /**
    * Constructs a <code>ManagedConnectionFactoryImpl</code> instance.
    */
   public ManagedConnectionFactoryImpl()
@@ -206,6 +217,29 @@
       if (outLocalAddress != null) {
         fp.outLocalAddress = outLocalAddress;
       }
+      if (inInterceptors != null) {
+    	String[] interceptorArray = inInterceptors.split(",");
+    	if (interceptorArray != null) {
+    	  for (String interceptorClassName : interceptorArray) {
+            String interceptorName = interceptorClassName.trim();
+    		if (interceptorName.length() > 0) {
+    		  fp.addInInterceptor(interceptorName);
+    	    }
+          }
+        }
+      }
+      if (outInterceptors != null) {
+        String[] interceptorArray = outInterceptors.split(",");
+        if (interceptorArray != null) {
+          for (String interceptorClassName : interceptorArray) {
+            String interceptorName = interceptorClassName.trim();
+            if (interceptorName.length() > 0) {
+    		  fp.addOutInterceptor(interceptorName);
+    		}
+          }
+        }
+      }      
+      
     }
   }
 
@@ -649,4 +683,12 @@
   public void setOutLocalPort(Integer outLocalPort) {
     this.outLocalPort = outLocalPort.intValue();
   }
+
+  public void setOutInterceptors(String outInterceptors) {
+    this.outInterceptors = outInterceptors;
+  }
+
+  public void setInInterceptors(String inInterceptors) {
+    this.inInterceptors = inInterceptors;
+  }
 }

Modified: trunk/joram/src/org/objectweb/joram/client/connector/ra.xml (3797 => 3798)


--- trunk/joram/src/org/objectweb/joram/client/connector/ra.xml	2010-04-13 15:55:06 UTC (rev 3797)
+++ trunk/joram/src/org/objectweb/joram/client/connector/ra.xml	2010-04-21 15:33:26 UTC (rev 3798)
@@ -153,6 +153,16 @@
               <config-property-type>java.lang.Boolean</config-property-type>
               <config-property-value>true</config-property-value>
             </config-property>
+            <config-property>
+              <config-property-name>OutInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
+            <config-property>
+              <config-property-name>InInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
             <connectionfactory-interface>javax.jms.QueueConnectionFactory</connectionfactory-interface>
             <connectionfactory-impl-class>org.objectweb.joram.client.connector.OutboundQueueConnectionFactory</connectionfactory-impl-class>
             <connection-interface>javax.jms.QueueConnection</connection-interface>
@@ -180,6 +190,16 @@
               <config-property-type>java.lang.Boolean</config-property-type>
               <config-property-value>true</config-property-value>
             </config-property>
+            <config-property>
+              <config-property-name>OutInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
+            <config-property>
+              <config-property-name>InInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
             <connectionfactory-interface>javax.jms.TopicConnectionFactory</connectionfactory-interface>
             <connectionfactory-impl-class>org.objectweb.joram.client.connector.OutboundTopicConnectionFactory</connectionfactory-impl-class>
             <connection-interface>javax.jms.TopicConnection</connection-interface>
@@ -208,6 +228,16 @@
               <config-property-value>true</config-property-value>
             </config-property>
             <config-property>
+              <config-property-name>OutInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
+            <config-property>
+              <config-property-name>InInterceptors</config-property-name>
+              <config-property-type>java.lang.String</config-property-type>
+              <config-property-value></config-property-value>
+            </config-property>
+            <config-property>
               <config-property-name>outLocalAddress</config-property-name>
               <config-property-type>java.lang.String</config-property-type>
               <!-- Empty value corresponds to INADDRANY (wildcard address) -->


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.