public LocalMUCRoom getRoom() { MultiUserChatService mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) { throw new IllegalArgumentException("MUC service not found for subdomain: "+subdomain); } LocalMUCRoom room = (LocalMUCRoom) mucService.getChatRoom(roomName); if (room == null) { throw new IllegalArgumentException("Room not found: " + roomName); } return room; }
/** * Retrieves a MultiUserChatService instance specified by any JID that refers to it. * In other words, it can be a hostname for the service, a room JID, or even the JID * of a occupant of the room. Basically it takes the hostname part of the JID, * strips off the server hostname from the end, leaving only the subdomain, and then calls * the subdomain version of the call. * * @param jid JID that contains a reference to the conference service. * @return The MultiUserChatService instance associated with the JID, or null if none found. */ public MultiUserChatService getMultiUserChatService(JID jid) { String subdomain = jid.getDomain().replace("."+ XMPPServer.getInstance().getServerInfo().getXMPPDomain(), ""); return getMultiUserChatService(subdomain); }
XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(service).getChatRoom(room).getOccupantsByBareJID(bareJID); return true;
/** * Deletes a configured MultiUserChatService by ID, and shuts it down. * * @param serviceID The ID opf the service to be deleted. * @throws NotFoundException if the service was not found. */ public void removeMultiUserChatService(Long serviceID) throws NotFoundException { MultiUserChatServiceImpl muc = (MultiUserChatServiceImpl) getMultiUserChatService(serviceID); if (muc == null) { Log.error("MultiUserChatManager: Unable to find service to remove for service ID "+serviceID); throw new NotFoundException(); } unregisterMultiUserChatService(muc.getServiceName()); deleteService(serviceID); }
@Override public void run() { MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (service != null) { if (service instanceof MultiUserChatServiceImpl) { MUCPersistenceManager.refreshProperties(subdomain); ((MultiUserChatServiceImpl)service).initializeSettings(); } else { // Ok. We don't handle non default implementations for this. Why are we seeing it? } } else { // Hrm. We got an update for something that we don't have. Log.warn("ServiceUpdatedEvent: Received update for service we are not running: "+subdomain); } }
@Override public void run() { MultiUserChatServiceImpl mucServer = (MultiUserChatServiceImpl) XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName); if (mucServer == null) throw new IllegalArgumentException("MUC service not found for subdomain: "+serviceName); HistoryStrategy strategy = mucServer.getHistoryStrategy(); strategy.setType(HistoryStrategy.Type.values()[type]); strategy.setMaxNumber(maxNumber); }
MultiUserChatServiceImpl muc = (MultiUserChatServiceImpl) getMultiUserChatService(serviceID); if (muc == null) throw new NotFoundException();
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename); if (mucService == null) { note.addAttribute("type", "error");
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) throw new IllegalArgumentException("MUC service not found for subdomain: " + subdomain); roomHistory = new MUCRoomHistory(this, new HistoryStrategy(mucService.getHistoryStrategy()));
for (ServiceInfo serviceInfo : result) { MultiUserChatService service; service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceInfo.getSubdomain()); if (service == null) {
public LocalMUCRoom getRoom() { MultiUserChatService mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) { throw new IllegalArgumentException("MUC service not found for subdomain: "+subdomain); } LocalMUCRoom room = (LocalMUCRoom) mucService.getChatRoom(roomName); if (room == null) { throw new IllegalArgumentException("Room not found: " + roomName); } return room; }
XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(service).getChatRoom(room).getOccupantsByBareJID(bareJID); return true;
/** * Retrieves a MultiUserChatService instance specified by any JID that refers to it. * In other words, it can be a hostname for the service, a room JID, or even the JID * of a occupant of the room. Basically it takes the hostname part of the JID, * strips off the server hostname from the end, leaving only the subdomain, and then calls * the subdomain version of the call. * * @param jid JID that contains a reference to the conference service. * @return The MultiUserChatService instance associated with the JID, or null if none found. */ public MultiUserChatService getMultiUserChatService(JID jid) { String subdomain = jid.getDomain().replace("."+ XMPPServer.getInstance().getServerInfo().getXMPPDomain(), ""); return getMultiUserChatService(subdomain); }
/** * Deletes a configured MultiUserChatService by ID, and shuts it down. * * @param serviceID The ID opf the service to be deleted. * @throws NotFoundException if the service was not found. */ public void removeMultiUserChatService(Long serviceID) throws NotFoundException { MultiUserChatServiceImpl muc = (MultiUserChatServiceImpl) getMultiUserChatService(serviceID); if (muc == null) { Log.error("MultiUserChatManager: Unable to find service to remove for service ID "+serviceID); throw new NotFoundException(); } unregisterMultiUserChatService(muc.getServiceName()); deleteService(serviceID); }
@Override public void run() { MultiUserChatService service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (service != null) { if (service instanceof MultiUserChatServiceImpl) { MUCPersistenceManager.refreshProperties(subdomain); ((MultiUserChatServiceImpl)service).initializeSettings(); } else { // Ok. We don't handle non default implementations for this. Why are we seeing it? } } else { // Hrm. We got an update for something that we don't have. Log.warn("ServiceUpdatedEvent: Received update for service we are not running: "+subdomain); } }
@Override public void run() { MultiUserChatServiceImpl mucServer = (MultiUserChatServiceImpl) XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceName); if (mucServer == null) throw new IllegalArgumentException("MUC service not found for subdomain: "+serviceName); HistoryStrategy strategy = mucServer.getHistoryStrategy(); strategy.setType(HistoryStrategy.Type.values()[type]); strategy.setMaxNumber(maxNumber); }
private void updateDomainRoom(String roomName, String roomStatus, String description) { Log.debug( "createRoom " + roomName + " " + roomStatus); boolean isBookmarksAvailable = XMPPServer.getInstance().getPluginManager().getPlugin("bookmarks") != null; try { String domainName = JiveGlobals.getProperty("xmpp.domain", XMPPServer.getInstance().getServerInfo().getHostname()); if (XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService("conference").hasChatRoom(roomName) == false) { MUCRoom room = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService("conference").getChatRoom(roomName); if (room == null) { room = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService("conference").getChatRoom(roomName, new JID("admin@"+domainName)); if (room != null) { configureRoom(room, description); if (isBookmarksAvailable) createBookMark(roomName, roomStatus, description); } } } } catch (Exception e) { Log.error("createRoom", e); } }
MultiUserChatServiceImpl muc = (MultiUserChatServiceImpl) getMultiUserChatService(serviceID); if (muc == null) throw new NotFoundException();
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(subdomain); if (mucService == null) throw new IllegalArgumentException("MUC service not found for subdomain: " + subdomain); roomHistory = new MUCRoomHistory(this, new HistoryStrategy(mucService.getHistoryStrategy()));
for (ServiceInfo serviceInfo : result) { MultiUserChatService service; service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceInfo.getSubdomain()); if (service == null) {