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