Package org.jivesoftware.smack.ping.packet

Examples of org.jivesoftware.smack.ping.packet.Ping


       
        if (pingInterval > 0) {
            periodicPingTask = periodicPingExecutorService.schedule(new Runnable() {
                @Override
                public void run() {
                    Ping ping = new Ping();
                    PacketFilter responseFilter = new PacketIDFilter(ping.getPacketID());
                    final PacketCollector response = connection.createPacketCollector(responseFilter);
                    connection.sendPacket(ping);
       
                    if (!pingFailedListeners.isEmpty()) {
                        // Schedule a collector for the ping reply, notify listeners if none is received.
View Full Code Here


       
        if (pingInterval > 0) {
            periodicPingTask = periodicPingExecutorService.schedule(new Runnable() {
                @Override
                public void run() {
                    Ping ping = new Ping();
                    PacketFilter responseFilter = new PacketIDFilter(ping.getPacketID());
                    final PacketCollector response = pingFailedListeners.isEmpty() ? null : connection.createPacketCollector(responseFilter);
                    connection.sendPacket(ping);
       
                    if (response != null) {
                        // Schedule a collector for the ping reply, notify listeners if none is received.
View Full Code Here

     * @param jid The id of the entity the ping is being sent to
     * @param pingTimeout The time to wait for a reply
     * @return true if a reply was received from the entity, false otherwise.
     */
    public boolean ping(String jid, long pingTimeout) {
        Ping ping = new Ping(jid);
       
        try {
            SyncPacketSend.getReply(connection, ping);
        }
        catch (XMPPException exc) {
View Full Code Here

public class PingProvider implements IQProvider {
   
    public IQ parseIQ(XmlPullParser parser) throws Exception {
        // No need to use the ping constructor with arguments. IQ will already
        // have filled out all relevant fields ('from', 'to', 'id').
        return new Ping();
    }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.ping.packet.Ping

Copyright © 2018 www.massapicom. 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.