Examples of XMPPConnectionFactory


Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

      TransportOutDescription transportOut) throws AxisFault {
    //if connection details are available from axis configuration
    //use those & connect to jabber server(s)
    serverCredentials = new XMPPServerCredentials();
    getConnectionDetailsFromAxisConfiguration(transportOut);   
    connectionFactory = new XMPPConnectionFactory();
    connectionFactory.connect(serverCredentials);   
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

   * Extract connection details from Client options
   * @param msgCtx
   */
  private void connectUsingClientOptions(MessageContext msgCtx) throws AxisFault{   
    getConnectionDetailsFromClientOptions(msgCtx);
    connectionFactory = new XMPPConnectionFactory();
    connectionFactory.connect(serverCredentials);
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

              serverCredentials.setPassword((String)param.getValue());                 
                }else if(XMPPConstants.XMPP_SERVER_TYPE.equals(param.getName())){
              serverCredentials.setServerType((String)param.getValue());                 
                }
            }
        XMPPConnectionFactory xmppConnectionFactory = new XMPPConnectionFactory();
        xmppConnectionFactory.connect(serverCredentials);
       
        connectionFactories.put(serverCredentials.getAccountName() + "@"
            + serverCredentials.getServerUrl(), xmppConnectionFactory);          
        }
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

                        new ThreadGroup("XMPP Worker thread group"),
                        "XMPPWorker"));

        Iterator iter = connectionFactories.values().iterator();
        while (iter.hasNext()) {
            XMPPConnectionFactory connectionFactory = (XMPPConnectionFactory) iter.next();
            XMPPPacketListener xmppPacketListener =
                    new XMPPPacketListener(connectionFactory,this.configurationContext,workerPool);
            connectionFactory.listen(xmppPacketListener);
       
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

    //if connection details are available from axis configuration
    //use those & connect to jabber server(s)
    serverCredentials = new XMPPServerCredentials();
    getConnectionDetailsFromAxisConfiguration(transportOut)
   
    defaultConnectionFactory = new XMPPConnectionFactory();
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

    public void sendMessage(MessageContext msgCtx, String targetAddress,
           
        OutTransportInfo outTransportInfo) throws AxisFault {
    XMPPConnection xmppConnection = null;
    XMPPOutTransportInfo xmppOutTransportInfo = null;
    XMPPConnectionFactory connectionFactory;
   
    //if on client side,create connection to xmpp server
    if(msgCtx.isServerSide()){
        xmppOutTransportInfo = (XMPPOutTransportInfo)msgCtx.getProperty(org.apache.axis2.Constants.OUT_TRANSPORT_INFO);
        connectionFactory = xmppOutTransportInfo.getConnectionFactory();
    }else{
        getConnectionDetailsFromClientOptions(msgCtx);
        connectionFactory = defaultConnectionFactory;
    }
   
    synchronized (this) {
            xmppConnection = connectionFactory.getXmppConnection();
            if(xmppConnection == null){
                connectionFactory.connect(serverCredentials);  
                xmppConnection = connectionFactory.getXmppConnection();
            }
        }
   
    Message message = new Message();
    Options options = msgCtx.getOptions();     
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

      TransportOutDescription transportOut) throws AxisFault {
    //if connection details are available from axis configuration
    //use those & connect to jabber server(s)
    XMPPServerCredentials serverCredentials = new XMPPServerCredentials();
    getConnectionDetailsFromAxisConfiguration(serverCredentials,transportOut);
    connectionFactory = new XMPPConnectionFactory();
    connectionFactory.connect(serverCredentials);   
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

   * @param msgCtx
   */
  private void connectUsingClientOptions(MessageContext msgCtx) throws AxisFault{   
    XMPPServerCredentials serverCredentials = new XMPPServerCredentials();
    getConnectionDetailsFromClientOptions(serverCredentials,msgCtx);
    connectionFactory = new XMPPConnectionFactory();
    connectionFactory.connect(serverCredentials);
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

              serverCredentials.setPassword((String)param.getValue());                 
                }else if(XMPPConstants.XMPP_SERVER_TYPE.equals(param.getName())){
              serverCredentials.setServerType((String)param.getValue());                 
                }
            }
        XMPPConnectionFactory xmppConnectionFactory = new XMPPConnectionFactory();
        xmppConnectionFactory.connect(serverCredentials);
       
        connectionFactories.put(serverCredentials.getAccountName() + "@"
            + serverCredentials.getServerUrl(), xmppConnectionFactory);          
        }
  }
View Full Code Here

Examples of org.apache.axis2.transport.xmpp.util.XMPPConnectionFactory

                        new ThreadGroup("XMPP Worker thread group"),
                        "XMPPWorker"));

        Iterator iter = connectionFactories.values().iterator();
        while (iter.hasNext()) {
            XMPPConnectionFactory connectionFactory = (XMPPConnectionFactory) iter.next();
            XMPPPacketListener xmppPacketListener =
                    new XMPPPacketListener(connectionFactory,this.configurationContext,workerPool);
            connectionFactory.listen(xmppPacketListener);
       
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.