1
2
3
4
5
6
7
8
9
10
11 package org.mule.transport.xmpp;
12
13 import org.mule.api.endpoint.EndpointURI;
14
15 import org.jivesoftware.smack.SSLXMPPConnection;
16 import org.jivesoftware.smack.XMPPConnection;
17 import org.jivesoftware.smack.XMPPException;
18
19 public class XmppsConnector extends XmppConnector
20 {
21
22 public static final String XMPPS = "xmpps";
23
24 public String getProtocol()
25 {
26 return XMPPS;
27 }
28
29
30
31
32
33 protected XMPPConnection doCreateXmppConnection(EndpointURI endpointURI) throws XMPPException
34 {
35 XMPPConnection xmppConnection = null;
36
37 if (endpointURI.getPort() != -1)
38 {
39 xmppConnection = new SSLXMPPConnection(endpointURI.getHost(), endpointURI.getPort());
40 }
41 else
42 {
43 xmppConnection = new SSLXMPPConnection(endpointURI.getHost());
44 }
45
46 return xmppConnection;
47 }
48
49 }