Package org.jivesoftware.smack.packet

Examples of org.jivesoftware.smack.packet.Presence.toXML()


        public void processPacket(Packet packet) {
            Presence presence = (Presence) packet;
            String iqString = presence.toString();
            final PacketExtension extension = presence.getExtension("http://jabber.org/protocol/caps");
            if (extension != null)
                System.out.println("T" + System.currentTimeMillis() + " Pres: " + iqString + ": " + presence.toXML());
        }
    }

    public static void main(String[] args) throws XMPPException {
View Full Code Here


        public void processPacket(Packet packet) {
            Presence presence = (Presence)packet;
            String from = presence.getFrom();
            if (from == null) {
                // TODO Check if we need to ignore these presences or this is a server bug?
                System.out.println("Presence with no FROM: " + presence.toXML());
                return;
            }
            String key = getPresenceMapKey(from);

            // If an "available" packet, add it to the presence map. Each presence map will hold
View Full Code Here

        public void processPacket(Packet packet) {
            Presence presence = (Presence)packet;
            String from = presence.getFrom();
            if (from == null) {
                // TODO Check if we need to ignore these presences or this is a server bug?
                System.out.println("Presence with no FROM: " + presence.toXML());
                return;
            }
            String key = getPresenceMapKey(from);

            // If an "available" packet, add it to the presence map. Each presence map will hold
View Full Code Here

        public void processPacket(Packet packet) {
            Presence presence = (Presence)packet;
            String from = presence.getFrom();
            if (from == null) {
                // TODO Check if we need to ignore these presences or this is a server bug?
                System.out.println("Presence with no FROM: " + presence.toXML());
                return;
            }
            String key = getPresenceMapKey(from);

            // If an "available" packet, add it to the presence map. Each presence map will hold
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.