Examples of nextResult()


Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        addresses2 = info2.getCCAddresses();
        assertEquals("Incorrect number of CC addresses", 1, addresses2.size());
        address2 = ((MultipleAddresses.Address) addresses2.get(0)).getJid();
        assertEquals("Incorrect CC address", getBareJID(2), address2);

        Packet message3 = collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNotNull("Connection 3 never received the message", message3);
        MultipleRecipientInfo info3 = MultipleRecipientManager.getMultipleRecipientInfo(message3);
        assertNotNull("Message 3 does not contain MultipleRecipientInfo", info3);
        assertFalse("Message 3 should be 'replyable'", info3.shouldNotReply());
        List addresses3 = info3.getTOAddresses();
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        assertNotNull("Connection2 didn't receive the 3 message", message1);
        message1 = (Message) collector2.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 4 messages", message1);

        // Check that connection3 recevied only 1 message (was BCC in the first message)
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNotNull("Connection3 didn't receive the 1 message", message1);
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 2 messages", message1);

        collector0.cancel();
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        assertNull("Connection2 received 4 messages", message1);

        // Check that connection3 recevied only 1 message (was BCC in the first message)
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNotNull("Connection3 didn't receive the 1 message", message1);
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 2 messages", message1);

        collector0.cancel();
        collector1.cancel();
        collector2.cancel();
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        assertNotNull("Connection2 didn't receive the 1 message", message1);
        message1 = (Message) collector2.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 2 messages", message1);

        // Check that connection3 recevied only 1 message (was BCC in the first message)
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNotNull("Connection3 didn't receive the 1 message", message1);
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 2 messages", message1);

        collector1.cancel();
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        assertNull("Connection2 received 2 messages", message1);

        // Check that connection3 recevied only 1 message (was BCC in the first message)
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNotNull("Connection3 didn't receive the 1 message", message1);
        message1 = (Message) collector3.nextResult(SmackConfiguration.getPacketReplyTimeout());
        assertNull("Connection2 received 2 messages", message1);

        collector1.cancel();
        collector2.cancel();
        collector3.cancel();
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

      chat1.sendMessage(msg);
  }
  catch (Exception e) {
      fail("An error occured sending the message with XHTML");
  }
  Packet packet = chat2.nextResult(2000);
  Message message = (Message) packet;
  assertNotNull("Body is null", message.getBody());
  try {
      xhtmlExtension =
    (XHTMLExtension) message.getExtension(
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

      chat1.sendMessage(msg);
  }
  catch (Exception e) {
      fail("An error occured sending the message with XHTML");
  }
  Packet packet = chat2.nextResult(2000);
  int received = 0;
  Message message = (Message) packet;
  assertNotNull("Body is null", message.getBody());
  try {
      xhtmlExtension =
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        PacketCollector collector = connection.createPacketCollector(
                new PacketIDFilter(data.getPacketID()));

        connection.sendPacket(data);

        Packet response = collector.nextResult(timeout);

        // Cancel the collector.
        collector.cancel();
        if (response == null) {
            throw new XMPPException("No response from server on status set.");
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        // Send the private data.
        connection.sendPacket(privateDataGet);

        // Wait up to five seconds for a response from the server.
        IQ response = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
        // Stop queuing results
        collector.cancel();
        if (response == null) {
            throw new XMPPException("No response from the server.");
        }
View Full Code Here

Examples of org.jivesoftware.smack.PacketCollector.nextResult()

        // Send the private data.
        connection.sendPacket(privateDataSet);

        // Wait up to five seconds for a response from the server.
        IQ response = (IQ)collector.nextResult(5000);
        // Stop queuing results
        collector.cancel();
        if (response == null) {
            throw new XMPPException("No response from the server.");
        }
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.