org.jivesoftware.smack.chat.ChatMessageListener Java Examples
The following examples show how to use
org.jivesoftware.smack.chat.ChatMessageListener.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MultiUserChat.java From Smack with Apache License 2.0 | 3 votes |
/** * Returns a new Chat for sending private messages to a given room occupant. * The Chat's occupant address is the room's JID (i.e. roomName@service/nick). The server * service will change the 'from' address to the sender's room JID and delivering the message * to the intended recipient's full JID. * * @param occupant occupant unique room JID (e.g. '[email protected]/Paul'). * @param listener the listener is a message listener that will handle messages for the newly * created chat. * @return new Chat for sending private messages to a given room occupant. */ // TODO This should be made new not using chat.Chat. Private MUC chats are different from XMPP-IM 1:1 chats in to many ways. // API sketch: PrivateMucChat createPrivateChat(Resourcepart nick) @SuppressWarnings("deprecation") public org.jivesoftware.smack.chat.Chat createPrivateChat(EntityFullJid occupant, ChatMessageListener listener) { return org.jivesoftware.smack.chat.ChatManager.getInstanceFor(connection).createChat(occupant, listener); }
Example #2
Source File: MultiUserChatLight.java From Smack with Apache License 2.0 | 2 votes |
/** * Returns a new Chat for sending private messages to a given room occupant. * The Chat's occupant address is the room's JID (i.e. * roomName@service/nick). The server service will change the 'from' address * to the sender's room JID and delivering the message to the intended * recipient's full JID. * * @param occupant TODO javadoc me please * occupant unique room JID (e.g. * '[email protected]/Paul'). * @param listener TODO javadoc me please * the listener is a message listener that will handle messages * for the newly created chat. * @return new Chat for sending private messages to a given room occupant. */ @Deprecated // Do not re-use Chat API, which was designed for XMPP-IM 1:1 chats and not MUClight private chats. public org.jivesoftware.smack.chat.Chat createPrivateChat(EntityJid occupant, ChatMessageListener listener) { return org.jivesoftware.smack.chat.ChatManager.getInstanceFor(connection).createChat(occupant, listener); }