camel git commit: CAMEL-10544: Keep the XmppEndpoint#connectionConfig type to be generic as it was before

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

camel git commit: CAMEL-10544: Keep the XmppEndpoint#connectionConfig type to be generic as it was before

bvahdat
Repository: camel
Updated Branches:
  refs/heads/master 3cb889dfd -> 71079baa1


CAMEL-10544: Keep the XmppEndpoint#connectionConfig type to be generic as it was before


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

Branch: refs/heads/master
Commit: 71079baa1726378adf17e9db7d718442e2d43f1c
Parents: 3cb889d
Author: Babak Vahdat <[hidden email]>
Authored: Thu May 18 23:11:43 2017 +0200
Committer: Babak Vahdat <[hidden email]>
Committed: Thu May 18 23:11:43 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/xmpp/XmppEndpoint.java   | 8 ++++----
 .../apache/camel/component/xmpp/EmbeddedXmppTestServer.java  | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/71079baa/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
index fb82b4b..5ebc570 100644
--- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
+++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
@@ -97,8 +97,8 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
     private int connectionPollDelay = 10;
     @UriParam(label = "filter")
     private HeaderFilterStrategy headerFilterStrategy = new DefaultHeaderFilterStrategy();
-    @UriParam(label = "advanced")
-    private XMPPTCPConnectionConfiguration connectionConfig;
+    @UriParam(label = "advanced", description = "Currently only XMPPTCPConnectionConfiguration is supported (XMPP over TCP) and not BOSHConfiguration (XMPP over HTTP)")
+    private ConnectionConfiguration connectionConfig;
 
     public XmppEndpoint() {
     }
@@ -222,7 +222,7 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
 
     private XMPPTCPConnection createConnectionInternal() throws UnknownHostException, XmppStringprepException {
         if (connectionConfig != null) {
-            return new XMPPTCPConnection(connectionConfig);
+            return new XMPPTCPConnection((XMPPTCPConnectionConfiguration) connectionConfig);
         }
 
         if (port == 0) {
@@ -432,7 +432,7 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg
     /**
      * To use an existing connection configuration
      */
-    public void setConnectionConfig(XMPPTCPConnectionConfiguration connectionConfig) {
+    public void setConnectionConfig(ConnectionConfiguration connectionConfig) {
         this.connectionConfig = connectionConfig;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/71079baa/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
index b252f90..7363a04 100644
--- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
+++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/EmbeddedXmppTestServer.java
@@ -39,6 +39,7 @@ import org.apache.vysper.xmpp.modules.extension.xep0045_muc.MUCModule;
 import org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Conference;
 import org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.RoomType;
 import org.apache.vysper.xmpp.server.XMPPServer;
+import org.jivesoftware.smack.ConnectionConfiguration;
 import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
 import org.jxmpp.jid.impl.JidCreate;
 
@@ -129,7 +130,7 @@ public final class EmbeddedXmppTestServer {
         SSLContext sslContext = SSLContext.getInstance("TLS");
         sslContext.init(null, trustManagerFactory.getTrustManagers(), new SecureRandom());
 
-        XMPPTCPConnectionConfiguration connectionConfig = XMPPTCPConnectionConfiguration.builder()
+        ConnectionConfiguration connectionConfig = XMPPTCPConnectionConfiguration.builder()
                 .setXmppDomain(JidCreate.domainBareFrom("apache.camel"))
                 .setHostAddress(InetAddress.getLocalHost())
                 .setPort(getXmppPort())