src/main/java/org/jivesoftware/smack/PacketCollector.java
protected void processPacket(Packet packet) {
        if (packet == null) {
            return;
        }

        if (packetFilter == null || packetFilter.accept(packet)) {
            while (!resultQueue.offer(packet)) {
                // Since we know the queue is full, this poll should never
                // actually block.
                resultQueue.poll();
            }
        }
    }
protected void processPacket(Packet packet) {
        if (packet == null) {
            return;
        }

        if (packetFilter == null || packetFilter.accept(packet)) {
            while (!resultQueue.offer(packet)) {
                // Since we know the queue is full, this poll should never
                // actually block.
                resultQueue.poll();
            }
        }
    }
protected void processPacket ( Packet packet ) { if ( packet == null ) { return ; } if ( packetFilter == null || packetFilter . accept ( packet ) ) { while ( ! resultQueue . offer ( packet ) ) { // Since we know the queue is full, this poll should never // actually block. resultQueue . poll ( ) ; } } }
Processes a packet to see if it meets the criteria for this packet
collector. If so, the packet is added to the result queue.

@param packet
the packet to process.
Processes a packet to see if it meets the criteria for this packet collector . If so the packet is added to the result queue .