private MultiUserChat createNewMucAndAddToMap(EntityBareJid jid) { MultiUserChat multiUserChat = new MultiUserChat(connection(), jid, this); multiUserChats.put(jid, new WeakReference<MultiUserChat>(multiUserChat)); return multiUserChat; }
@Override protected void doConnect() throws ConnectException { chat = new MultiUserChat(connection, recipient); joinChat(); }
public MultiUserChat joinChannelWithoutHashing(String name, String password) { MultiUserChat chat = new MultiUserChat(this, name); chatRooms.put(name, chat); try { chat.join(getUsername(), password); return chat; } catch (XMPPException.XMPPErrorException | SmackException e) { throw new IllegalStateException(e); } }
} else { LOG.debug("Adding room: {}", xmppChatRoom); groupChat = new MultiUserChat(xmpp, xmppChatRoom); rooms.put(xmppChatRoom, groupChat);
private synchronized MultiUserChat createChat(KenaiFeature prj) { MultiUserChat multiUserChat = new MultiUserChat(connection, getChatroomName(prj)); groupChats.put(prj.getName(), multiUserChat); groupMessageQueue.put(prj.getName(), new LinkedList<Message>()); multiUserChat.addMessageListener(new MessageL()); join(multiUserChat); return multiUserChat; }
private void setChatRoomInvitationListener() { Thread thread = new Thread(new Runnable() { @Override public void run() { MultiUserChat.addInvitationListener(xmppConnection, new InvitationListener() { @Override public void invitationReceived(Connection connection,String room, String inviter, String reason,String unKnown, Message message) { XMPPConnectionUtils.configureChatStandards(); MultiUserChat muc = new MultiUserChat(connection, room); try { muc.join("My_Name_Here"); } catch (XMPPException e) { e.printStackTrace(); } } }); } }); thread.start(); }
public MultiUserChat joinChannel(String channelName, ChatType type, String password) { try { channelName = channelName.toLowerCase(); MultiUserChat room = new MultiUserChat(this, getChatRoomJID(channelName, type, password, password==null)); chatRooms.put(channelName, room); if (password == null) { try { room.join(getUsername()); room.sendRegistrationForm(room.getRegistrationForm()); } catch (NoResponseException e) { //throw new IllegalStateException("Could not join room", e); } } else { room.join(getUsername(), password); } return room; } catch (Exception e) { throw new IllegalStateException(e); } }
@Override public SampleResult perform(JMeterXMPPSampler sampler, SampleResult res) throws Exception { String room = sampler.getPropertyAsString(ROOM); String nick = sampler.getPropertyAsString(NICKNAME); res.setSamplerData("Join Room: " + room + "/" + nick); MultiUserChat muc = new MultiUserChat(sampler.getXMPPConnection(), room); muc.join(nick); return res; }
new MultiUserChat(connection, managementChannel + "@" + bus + "." + domain); try { new MultiUserChat(connection, channel + "@" + bus + "." + domain); try {
muc = new MultiUserChat(connection, room); muc.join(pseudo, "", history, 4000);
connection.loginAnonymously(); MultiUserChat muc = new MultiUserChat(connection, room); String pseudo = WikittyUtil.getUniqueLoginName(); System.out.println("pseudo: " + pseudo);