camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [08/13] camel git commit: [camel-amqp] Added extra factory methods.
Date Mon, 29 Feb 2016 08:32:52 GMT
[camel-amqp] Added extra factory methods.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a7f18460
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7f18460
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7f18460

Branch: refs/heads/camel-2.16.x
Commit: a7f184603c16081b23b4edbc4e329f41582eb88a
Parents: dc712e4
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Thu Dec 3 12:15:50 2015 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Feb 29 09:28:54 2016 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/amqp/AMQPComponent.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a7f18460/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
index 3100e20..8dcf7e6 100644
--- a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
+++ b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
@@ -29,6 +29,8 @@ import org.apache.qpid.jms.JmsConnectionFactory;
  */
 public class AMQPComponent extends JmsComponent {
 
+    // Constructors
+
     public AMQPComponent() {
         super(AMQPEndpoint.class);
     }
@@ -45,6 +47,8 @@ public class AMQPComponent extends JmsComponent {
         setConnectionFactory(connectionFactory);
     }
 
+    // Factory methods
+
     /**
      * Use {@code amqpComponent(String uri)} instead.
      */
@@ -61,4 +65,10 @@ public class AMQPComponent extends JmsComponent {
         return new AMQPComponent(connectionFactory);
     }
 
+    public static AMQPComponent amqpComponent(String uri, String username, String password)
{
+        JmsConnectionFactory connectionFactory = new JmsConnectionFactory(username, password,
uri);
+        connectionFactory.setTopicPrefix("topic://");
+        return new AMQPComponent(connectionFactory);
+    }
+
 }


Mime
View raw message