Coverage Report - org.mule.transport.xmpp.XmppsConnector
 
Classes in this File Line Coverage Branch Coverage Complexity
XmppsConnector
29%
2/7
0%
0/2
1.5
 
 1  
 /*
 2  
  * $Id: XmppsConnector.java 10489 2008-01-23 17:53:38Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 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  8
 public class XmppsConnector extends XmppConnector
 20  
 {
 21  
 
 22  
     public static final String XMPPS = "xmpps";
 23  
 
 24  
     public String getProtocol()
 25  
     {
 26  20
         return XMPPS;
 27  
     }
 28  
 
 29  
     /**
 30  
      * This method creates a {@link SSLXMPPConnection} to allow secure communication to the Jabber
 31  
      * server.
 32  
      */
 33  
     protected XMPPConnection doCreateXmppConnection(EndpointURI endpointURI) throws XMPPException
 34  
     {
 35  0
         XMPPConnection xmppConnection = null;
 36  
         
 37  0
         if (endpointURI.getPort() != -1)
 38  
         {
 39  0
             xmppConnection = new SSLXMPPConnection(endpointURI.getHost(), endpointURI.getPort());
 40  
         }
 41  
         else
 42  
         {
 43  0
             xmppConnection = new SSLXMPPConnection(endpointURI.getHost());
 44  
         }
 45  
         
 46  0
         return xmppConnection;
 47  
     }
 48  
     
 49  
 }