camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hekon...@apache.org
Subject camel git commit: [camel-amqp] Added extra factory methods.
Date Thu, 03 Dec 2015 11:15:56 GMT
Repository: camel
Updated Branches:
  refs/heads/master ea41121d1 -> ec9a37b28


[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/ec9a37b2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ec9a37b2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ec9a37b2

Branch: refs/heads/master
Commit: ec9a37b2816325c916afb4661177b5ea28cd7c3a
Parents: ea41121
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Thu Dec 3 12:15:50 2015 +0100
Committer: Henryk Konsek <hekonsek@gmail.com>
Committed: Thu Dec 3 12:15:50 2015 +0100

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


http://git-wip-us.apache.org/repos/asf/camel/blob/ec9a37b2/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