本文整理匯總了Java中org.jivesoftware.smack.Chat.addMessageListener方法的典型用法代碼示例。如果您正苦於以下問題:Java Chat.addMessageListener方法的具體用法?Java Chat.addMessageListener怎麽用?Java Chat.addMessageListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jivesoftware.smack.Chat
的用法示例。
在下文中一共展示了Chat.addMessageListener方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
@Override
public void chatCreated(Chat chat, boolean isLocal) {
Logger.log("chat " + chat.getParticipant(), LoggerLevel.VERBOSE);
if (chats.get(getInternalService().getService().getEntityAdapter().normalizeJID(chat.getParticipant())) == null) {
chat.addMessageListener(this);
chats.put(getInternalService().getService().getEntityAdapter().normalizeJID(chat.getParticipant()), chat);
}
}
示例2: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
public void chatCreated(Chat chat, boolean createdLocally) {
if (!createdLocally) {
if (LOG.isDebugEnabled()) {
LOG.debug("Accepting incoming chat session from " + chat.getParticipant());
}
chat.addMessageListener(this);
}
}
示例3: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
/**
* Called when a new chat is created with the bot
*
* @see org.jivesoftware.smack.ChatManagerListener
*/
@Override
public void chatCreated(Chat chat, boolean createdLocally) {
logger.trace("Chat started with: {}", chat.getParticipant());
chat.addMessageListener(this);
}
示例4: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
@Override
public void chatCreated(Chat chat, boolean createdLocally) {
Log.i(TAG, "chatCreated");
if (!createdLocally) { // is this needed ? - Jeroen
chat.addMessageListener(this);
}
}
示例5: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
@Override
public void chatCreated(Chat chat, boolean isLocal) {
if(smackChatStateListener == null) {
smackChatStateListener = new SmackChatStateListener();
}
chat.addMessageListener(smackChatStateListener);
}
示例6: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
@Override
public void chatCreated(Chat chat, boolean createdLocally) {
Log.i(TAG, "chatCreated()");
chat.addMessageListener(this);
}
示例7: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
public void chatCreated(Chat chat, boolean b) {
chat.addMessageListener(this);
}
示例8: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
public void chatCreated(final Chat chat, boolean createdLocally) {
chat.addMessageListener(this);
}
示例9: chatCreated
import org.jivesoftware.smack.Chat; //導入方法依賴的package包/類
@Override
public void chatCreated(Chat chat, boolean isLocal) {
chat.addMessageListener(this);
}