Lines Matching defs:packet

43 import org.jivesoftware.smack.packet.Packet;
44 import org.jivesoftware.smack.packet.Presence;
146 * List of PacketListeners that will be notified when a new packet was received.
152 * List of PacketListeners that will be notified when a new packet was sent.
158 * List of PacketInterceptors that will be notified when a new packet is about to be
159 * sent to the server. These interceptors may modify the packet before it is being
415 * Sends the specified packet to the server.
417 * @param packet the packet to send.
419 public abstract void sendPacket(Packet packet);
498 * packet is set with online information, but most XMPP servers will deliver the full
499 * presence packet with whatever data is set.<p>
507 * @param unavailablePresence the presence packet to send during shutdown.
579 * Creates a new packet collector for this connection. A packet filter determines
584 * @param packetFilter the packet filter to use.
585 * @return a new packet collector.
595 * Remove a packet collector of this connection.
597 * @param collector a packet collectors which was created for this connection.
604 * Get the collection of all packet collectors for this connection.
606 * @return a collection of packet collectors for this connection.
613 * Registers a packet listener with this connection. A packet filter determines
614 * which packets will be delivered to the listener. If the same packet listener
617 * @param packetListener the packet listener to notify of new received packets.
618 * @param packetFilter the packet filter to use.
629 * Removes a packet listener for received packets from this connection.
631 * @param packetListener the packet listener to remove.
638 * Get a map of all packet listeners for received packets of this connection.
640 * @return a map of all packet listeners for received packets.
647 * Registers a packet listener with this connection. The listener will be
648 * notified of every packet that this connection sends. A packet filter determines
651 * packet listener should complete all operations quickly or use a different
654 * @param packetListener the packet listener to notify of sent packets.
655 * @param packetFilter the packet filter to use.
666 * Removes a packet listener for sending packets from this connection.
668 * @param packetListener the packet listener to remove.
675 * Get a map of all packet listeners for sending packets of this connection.
677 * @return a map of all packet listeners for sent packets.
685 * Process all packet listeners for sending packets.
687 * @param packet the packet to process.
689 protected void firePacketSendingListeners(Packet packet) {
690 // Notify the listeners of the new sent packet
692 listenerWrapper.notifyListener(packet);
697 * Registers a packet interceptor with this connection. The interceptor will be
698 * invoked every time a packet is about to be sent by this connection. Interceptors
699 * may modify the packet to be sent. A packet filter determines which packets
702 * @param packetInterceptor the packet interceptor to notify of packets about to be sent.
703 * @param packetFilter the packet filter to use.
714 * Removes a packet interceptor.
716 * @param packetInterceptor the packet interceptor to remove.
727 * Get a map of all packet interceptors for sending packets of this connection.
729 * @return a map of all packet interceptors for sending packets.
736 * Process interceptors. Interceptors may modify the packet that is about to be sent.
737 * Since the thread that requested to send the packet will invoke all interceptors, it
741 * @param packet the packet that is going to be sent to the server
743 protected void firePacketInterceptors(Packet packet) {
744 if (packet != null) {
746 interceptorWrapper.notifyListener(packet);
846 * A wrapper class to associate a packet filter with a listener.
854 * Create a class which associates a packet filter with a listener.
856 * @param packetListener the packet listener.
865 * Notify and process the packet listener if the filter matches the packet.
867 * @param packet the packet which was sent or received.
869 public void notifyListener(Packet packet) {
870 if (packetFilter == null || packetFilter.accept(packet)) {
871 packetListener.processPacket(packet);
877 * A wrapper class to associate a packet filter with an interceptor.
885 * Create a class which associates a packet filter with an interceptor.
910 * Notify and process the packet interceptor if the filter matches the packet.
912 * @param packet the packet which will be sent.
914 public void notifyListener(Packet packet) {
915 if (packetFilter == null || packetFilter.accept(packet)) {
916 packetInterceptor.interceptPacket(packet);