Examples of PacketTypeFilter


Examples of org.jivesoftware.smack.filter.PacketTypeFilter

    iqSent.setTo(getFullJID(0));
    iqSent.setFrom(getFullJID(0));
    iqSent.setType(IQ.Type.GET);

    // Create a filter and a collector...
    PacketFilter filter = new PacketTypeFilter(IQ.class);
    PacketCollector collector = getConnection(0).createPacketCollector(filter);

    System.out.println("Testing if a Jingle IQ can be sent and received...");

    // Send the iq packet with an invalid namespace
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

    public synchronized void prepareConnection(Connection connection) {
        if (this.connection != null)
            disposeConnection();

        this.connection = connection;
        connection.addPacketListener(packetListener, new PacketTypeFilter(
            Presence.class));
    }
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

    connection.addPacketListener(new PacketListener() {
      public void processPacket(Packet packet) {
        fireNewRequest((StreamInitiation) packet);
      }
    }, new AndFilter(new PacketTypeFilter(StreamInitiation.class),
        new IQTypeFilter(IQ.Type.SET)));
  }
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

    public void afterPropertiesSet() throws Exception {
        super.afterPropertiesSet();

        if (filter == null) {
            filter = new PacketTypeFilter(Message.class);
        }
    }
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

        } else {
            // add the presence packet listener to the connection so we only get packets that concers us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

            }
        } else {
            // add the presence packet listener to the connection so we only get packets that concerns us
            // we must add the listener before creating the muc
            final ToContainsFilter toFilter = new ToContainsFilter(endpoint.getParticipant());
            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

        ConnectionConfiguration cc2 = new ConnectionConfiguration(XMPP_ADDRESS2, Integer.valueOf(XMPP_PORT2));
        XMPPConnection conn2 = new XMPPConnection(cc2);

        conn2.connect();

        PacketCollector pc = conn2.createPacketCollector(new PacketTypeFilter(Message.class));
        conn2.login(XMPP_LOGIN2, XMPP_PASSWORD2);

        Packet p = pc.nextResult();

        TestStringDocument result = instance.getExtension(p);
View Full Code Here

Examples of org.jivesoftware.smack.filter.PacketTypeFilter

        ConnectionConfiguration cc2 = new ConnectionConfiguration(XMPP_ADDRESS2, Integer.valueOf(XMPP_PORT2));
        XMPPConnection conn2 = new XMPPConnection(cc2);

        conn2.connect();

        PacketCollector pc = conn2.createPacketCollector(new PacketTypeFilter(Message.class));
       
        conn2.login(XMPP_LOGIN2, XMPP_PASSWORD2);

        Packet p = pc.nextResult();
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.