Examples of DiscussionHistory


Examples of org.jivesoftware.smackx.muc.DiscussionHistory

            chat.addInvitationRejectionListener(invitationRejectionPacketListener);

            int errorCode = 0;

            try {
                chat.join(nickname, pass, new DiscussionHistory(),
                        SmackConfiguration.getPacketReplyTimeout());
            } catch (XMPPException e) {
                if (!cancelled) {
                    if (e.getXMPPError() == null)
        {
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

          xmppConnection.loginAnonymously();
        } else {
          xmppConnection.login(cnf.getString("xmppUser"), cnf.getString("xmppPassword", ""));
        }
        // Only do this if the connection didn't fail
        DiscussionHistory history = new DiscussionHistory();
        history.setMaxStanzas(0);
        chatRoom = new MultiUserChat(xmppConnection, cnf.getString("xmppRoom.name"));
        chatRoom.addMessageListener(this);
        chatRoom.addParticipantStatusListener(this);
        chatRoom.addSubjectUpdatedListener(this);
        chatRoom.addUserStatusListener(this);
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

            privateChat = endpoint.getConnection().getChatManager().createChat(endpoint.getParticipant(), this);
            LOG.info("Open chat to " + privateChat.getParticipant());
        } else {
            muc = new MultiUserChat(endpoint.getConnection(), endpoint.resolveRoom());
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages
            muc.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            LOG.info("Joined room: " + muc.getRoom());
        }
        super.doStart();
    }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

    @Override
    protected void doStart() throws Exception {
        if (chat == null) {
            chat = new MultiUserChat(endpoint.getConnection(), room);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages
            chat.join(this.endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
        }
        super.doStart();
    }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

        }

        if (chat == null) {
            room = endpoint.resolveRoom(connection);
            chat = new MultiUserChat(connection, room);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages
            chat.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            if (LOG.isInfoEnabled()) {
                LOG.info("Joined room: " + room + " as: " + endpoint.getNickname());
            }
        }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages

            muc.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            if (LOG.isInfoEnabled()) {
                LOG.info("Joined room: " + muc.getRoom() + " as: " + endpoint.getNickname());
            }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

                LOG.info("Open private chat to: " + privateChat.getParticipant());
            }
        } else {
            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages

            muc.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            if (LOG.isInfoEnabled()) {
                LOG.info("Joined room: " + muc.getRoom() + " as: " + endpoint.getNickname());
            }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

        }
    }
   
    protected void tryToJoinChat() throws XMPPException
    {
        DiscussionHistory history = new DiscussionHistory();
        history.setMaxStanzas(0);
       
        // use the same default value that the smack API uses internally
        long joinTimeout = SmackConfiguration.getPacketReplyTimeout();
       
        chat.join(nickname, null, history, joinTimeout);
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

            final AndFilter packetFilter = new AndFilter(new PacketTypeFilter(Presence.class), toFilter);
            connection.addPacketListener(this, packetFilter);

            muc = new MultiUserChat(connection, endpoint.resolveRoom(connection));
            muc.addMessageListener(this);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages

            muc.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            if (LOG.isInfoEnabled()) {
                LOG.info("Joined room: " + muc.getRoom() + " as: " + endpoint.getNickname());
            }
View Full Code Here

Examples of org.jivesoftware.smackx.muc.DiscussionHistory

        }

        if (chat == null) {
            room = endpoint.resolveRoom(connection);
            chat = new MultiUserChat(connection, room);
            DiscussionHistory history = new DiscussionHistory();
            history.setMaxChars(0); // we do not want any historical messages
            chat.join(endpoint.getNickname(), null, history, SmackConfiguration.getPacketReplyTimeout());
            if (LOG.isInfoEnabled()) {
                LOG.info("Joined room: " + room + " as: " + endpoint.getNickname());
            }
        }
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.