Package org.jivesoftware.smack

Examples of org.jivesoftware.smack.MessageListener


            public boolean accept(Packet packet) {
                return true;
            }
        });

        Chat chat = producerCon.getChatManager().createChat("consumer", new MessageListener() {
            public void processMessage(Chat chat, Message message) {
                LOG.info("Got XMPP message from chat " + chat.getParticipant() + " message - " + message.getBody());
            }
        });
View Full Code Here


        producerCon.connect();
        addLoggingListeners("PRODUCER", producerCon);
        producerCon.login("producer", "producer");

        //create the chat and send some messages
        Chat chat = producerCon.getChatManager().createChat("consumer", new MessageListener() {
            public void processMessage(Chat chat, Message message) {
                LOG.info("Got XMPP message from chat " + chat.getParticipant() + " message - " + message.getBody());
            }
        });
View Full Code Here

        ChatManager chatManager = connection.getChatManager();
        LOG.debug("Looking for existing chat instance with thread ID " + endpoint.getChatId());
        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            LOG.debug("Creating new chat instance with thread ID " + endpoint.getChatId());
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    LOG.debug("Received and discarding message from " + getParticipant() + " : " + message.getBody());
                }
            });
View Full Code Here

        }

        ChatManager chatManager = connection.getChatManager();
        Chat chat = chatManager.getThreadChat(getParticipant());
        if (chat == null) {
            chat = chatManager.createChat(getParticipant(), getParticipant(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                }
            });
        }
View Full Code Here

        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Creating new chat instance with thread ID {}", endpoint.getChatId());
            }
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from {} : {}"
                                , getParticipant(), message.getBody());
View Full Code Here

        LOG.trace("Looking for existing chat instance with thread ID {}", endpoint.getChatId());
        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            LOG.trace("Creating new chat instance with thread ID {}", endpoint.getChatId());
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from {} : {}", getParticipant(), message.getBody());
                    }
View Full Code Here

        Chat chat = chatManager.getThreadChat(thread);
        if (chat == null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Creating new chat instance with thread ID {}", thread);
            }
            chat = chatManager.createChat(participant, thread, new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from {} : {}"
                                , participant, message.getBody());
View Full Code Here

        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Creating new chat instance with thread ID " + endpoint.getChatId());
            }
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from " + getParticipant() + " : " + message.getBody());
                    }
View Full Code Here

        try {
            ChatManager chatManager = endpoint.getConnection().getChatManager();
            Chat chat = chatManager.getThreadChat(threadId);

            if (chat == null) {
                chat = chatManager.createChat(getParticipant(), threadId, new MessageListener() {
                    public void processMessage(Chat chat, Message message) {
                        // not here to do conversation
                    }
                });
            }
View Full Code Here

        Chat chat = chatManager.getThreadChat(endpoint.getChatId());
        if (chat == null) {
            if (LOG.isTraceEnabled()) {
                LOG.trace("Creating new chat instance with thread ID " + endpoint.getChatId());
            }
            chat = chatManager.createChat(getParticipant(), endpoint.getChatId(), new MessageListener() {
                public void processMessage(Chat chat, Message message) {
                    // not here to do conversation
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Received and discarding message from " + getParticipant() + " : " + message.getBody());
                    }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.MessageListener

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.