communication-xmpp/src/main/java/org/arrowhead/wp5/com/xmpp/api/HOXTWrapper.java
public void init(boolean initClient) throws XMPPException, SmackException,
            IOException, InterruptedException {

        logger.info("Initializing connection to server {}",
                conConfig.getServiceName());
        // + conConfig.getXMPPServiceDomain()));

        // SmackConfiguration.setDefaultPacketReplyTimeout(packetReplyTimeout);
        connection = new XMPPTCPConnection(conConfig);
        connection.setPacketReplyTimeout(30000);
        connection.connect();
        ReconnectionManager.getInstanceFor(connection).enableAutomaticReconnection();
        /* To avoid exception when looking for Roster */
        Roster.getInstanceFor(connection).setRosterLoadedAtLogin(false);

        connection.login();
        logger.info("Connected: {}", connection.isConnected());

        if (SmackConfiguration.DEBUG == true) {
            ServiceDiscoveryManager discoManager = ServiceDiscoveryManager
                    .getInstanceFor(connection);
            // Get the information of a given XMPP entity
            DiscoverInfo discoInfo = discoManager.discoverInfo(this.connection
                    .getUser());
            // Check if room is HOXT is supported
            logger.info("Test hoxt supported: {}",
                    discoInfo.containsFeature("urn:xmpp:http"));
        }

        if (resourceManager != null) {
            initServer();
        }
        if (initClient) {
            initClient();
        }
    }
/**
     * Initialize the XMPP manager, first function to call after constructor
     * 
     * @throws XMPPException
     * @throws IOException
     * @throws SmackException
     * @throws InterruptedException
     */
Initialize the XMPP manager, first function to call after constructor


Initialize the XMPP manager first function to call after constructor
public void init(boolean initClient) throws XMPPException, SmackException,
            IOException, InterruptedException {
        logger.info("Initializing connection to server {}",
                conConfig.getServiceName());
        connection = new XMPPTCPConnection(conConfig);
        connection.setPacketReplyTimeout(30000);
        connection.connect();
        ReconnectionManager.getInstanceFor(connection).enableAutomaticReconnection();
        /* To avoid exception when looking for Roster */
        Roster.getInstanceFor(connection).setRosterLoadedAtLogin(false);
        connection.login();
        logger.info("Connected: {}", connection.isConnected());
        if (SmackConfiguration.DEBUG == true) {
            ServiceDiscoveryManager discoManager = ServiceDiscoveryManager
                    .getInstanceFor(connection);
            DiscoverInfo discoInfo = discoManager.discoverInfo(this.connection
                    .getUser());
            logger.info("Test hoxt supported: {}",
                    discoInfo.containsFeature("urn:xmpp:http"));
        }
        if (resourceManager != null) {
            initServer();
        }
        if (initClient) {
            initClient();
        }
    }
public void init ( boolean initClient ) throws XMPPException , SmackException , IOException , InterruptedException { logger . info ( "Initializing connection to server {}" , conConfig . getServiceName ( ) ) ; connection = new XMPPTCPConnection ( conConfig ) ; connection . setPacketReplyTimeout ( 30000 ) ; connection . connect ( ) ; ReconnectionManager . getInstanceFor ( connection ) . enableAutomaticReconnection ( ) ; /* To avoid exception when looking for Roster */ Roster . getInstanceFor ( connection ) . setRosterLoadedAtLogin ( false ) ; connection . login ( ) ; logger . info ( "Connected: {}" , connection . isConnected ( ) ) ; if ( SmackConfiguration . DEBUG == true ) { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager . getInstanceFor ( connection ) ; DiscoverInfo discoInfo = discoManager . discoverInfo ( this . connection . getUser ( ) ) ; logger . info ( "Test hoxt supported: {}" , discoInfo . containsFeature ( "urn:xmpp:http" ) ) ; } if ( resourceManager != null ) { initServer ( ) ; } if ( initClient ) { initClient ( ) ; } }
Initialize the XMPP manager, first function to call after constructor
Initialize the XMPP manager first function to call after constructor
// + conConfig.getXMPPServiceDomain())); // SmackConfiguration.setDefaultPacketReplyTimeout(packetReplyTimeout); // Get the information of a given XMPP entity // Check if room is HOXT is supported