Package org.jivesoftware.smackx

Examples of org.jivesoftware.smackx.ServiceDiscoveryManager.addFeature()


          ecm.enableEntityCaps();

          disco.addFeature("http://jabber.org/protocol/disco#info");
          disco.addFeature("urn:xmpp:jingle:1");
          disco.addFeature("urn:xmpp:jingle:transports:ice-udp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:audio");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:video");
         
          // Handle all incoming Jingle packets with a Jingle Packet Handler.
          sampleJinglePacketHandler = new SampleJinglePacketHandler(connection) ;
View Full Code Here


          disco.addFeature("http://jabber.org/protocol/disco#info");
          disco.addFeature("urn:xmpp:jingle:1");
          disco.addFeature("urn:xmpp:jingle:transports:ice-udp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:audio");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:video");
         
          // Handle all incoming Jingle packets with a Jingle Packet Handler.
          sampleJinglePacketHandler = new SampleJinglePacketHandler(connection) ;
         
View Full Code Here

          disco.addFeature("http://jabber.org/protocol/disco#info");
          disco.addFeature("urn:xmpp:jingle:1");
          disco.addFeature("urn:xmpp:jingle:transports:ice-udp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:1");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:audio");
          disco.addFeature("urn:xmpp:jingle:apps:rtp:video");
         
          // Handle all incoming Jingle packets with a Jingle Packet Handler.
          sampleJinglePacketHandler = new SampleJinglePacketHandler(connection) ;
         
          // display out all packets that get sent:
View Full Code Here

     * Adds the SOCKS5 Bytestream feature to the service discovery.
     */
    private void enableService() {
        ServiceDiscoveryManager manager = ServiceDiscoveryManager.getInstanceFor(this.connection);
        if (!manager.includesFeature(NAMESPACE)) {
            manager.addFeature(NAMESPACE);
        }
    }

    /**
     * Returns a new unique session ID.
View Full Code Here

    private Set<ReceiptReceivedListener> receiptReceivedListeners = Collections
            .synchronizedSet(new HashSet<ReceiptReceivedListener>());

    private DeliveryReceiptManager(Connection connection) {
        ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection);
        sdm.addFeature(DeliveryReceipt.NAMESPACE);
        this.connection = connection;
        instances.put(connection, this);

        // register listener for delivery receipts and requests
        connection.addPacketListener(this, new PacketExtensionFilter(DeliveryReceipt.NAMESPACE));
View Full Code Here

       
        // The ServiceDiscoveryManager was not pre-initialized
        if (sdm == null)
            sdm = new ServiceDiscoveryManager(connection);
       
        sdm.addFeature(Ping.NAMESPACE);
       
        PacketFilter pingPacketFilter = new AndFilter(new PacketTypeFilter(Ping.class), new IQTypeFilter(Type.GET));
       
        connection.addPacketListener(new PacketListener() {
            /**
 
View Full Code Here

        }

        for (String namespace : namespaces) {
            if (isEnabled) {
                if (!manager.includesFeature(namespace)) {
                    manager.addFeature(namespace);
                }
            } else {
                manager.removeFeature(namespace);
            }
        }
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.