本文整理了Java中org.jivesoftware.openfire.XMPPServer.getMultiUserChatManager()
方法的一些代码示例,展示了XMPPServer.getMultiUserChatManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMPPServer.getMultiUserChatManager()
方法的具体详情如下:
包路径:org.jivesoftware.openfire.XMPPServer
类名称:XMPPServer
方法名:getMultiUserChatManager
[英]Returns the MultiUserChatManager
registered with this server. The MultiUserChatManager
was registered with the server as a module while starting up the server.
[中]返回在此服务器上注册的MultiUserChatManager
。启动服务器时,MultiUserChatManager
已作为模块注册到服务器。
代码示例来源:origin: igniterealtime/Openfire
public MultiUserChatManager getMultiUserChatManager() {
return getXMPPServer().getMultiUserChatManager();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
services = new ArrayList<>();
// Get all services and include them in the reply
for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
services.add(new ServiceInfo(mucService));
}
}
代码示例来源:origin: igniterealtime/Openfire
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;
}
代码示例来源:origin: igniterealtime/Openfire
public MUCServiceProperties(String subdomain) {
this.subdomain = subdomain;
if (properties == null) {
properties = new ConcurrentHashMap<>();
}
else {
properties.clear();
}
serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(subdomain);
if (serviceID == null) {
Log.debug("MUCServiceProperties: Unable to find service ID for subdomain "+subdomain);
}
else {
loadProperties();
}
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
XMPPServer.getInstance().getMultiUserChatManager().unregisterMultiUserChatService(subdomain);
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
// If it's registered already, no need to create it. Most likely this is because the service
// is provided by an internal component that registered at startup. This scenario, however,
// should really never occur.
if (!XMPPServer.getInstance().getMultiUserChatManager().isServiceRegistered(subdomain)) {
MultiUserChatService service = new MultiUserChatServiceImpl(subdomain, description, isHidden);
XMPPServer.getInstance().getMultiUserChatManager().registerMultiUserChatService(service);
}
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
count = 0;
for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
count += mucService.getNumberConnectedUsers(true);
}
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
rooms = new ArrayList<>();
// Get all services that have local occupants and include them in the reply
for (MultiUserChatService mucService : XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServices()) {
// Get rooms that have local occupants and include them in the reply
for (MUCRoom room : mucService.getChatRooms()) {
LocalMUCRoom localRoom = (LocalMUCRoom) room;
Collection<MUCRole> localOccupants = new ArrayList<>();
for (MUCRole occupant : room.getOccupants()) {
if (occupant.isLocal()) {
localOccupants.add(occupant);
}
}
if (!localOccupants.isEmpty()) {
rooms.add(new RoomInfo(localRoom, localOccupants));
}
}
}
}
代码示例来源:origin: igniterealtime/Openfire
XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(service).getChatRoom(room).getOccupantsByBareJID(bareJID);
return true;
代码示例来源:origin: igniterealtime/Openfire
@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);
}
}
代码示例来源:origin: igniterealtime/Openfire
@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);
}
代码示例来源:origin: igniterealtime/Openfire
pstmt.setLong(1, XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName()));
pstmt.setLong(2, room.getID());
pstmt.setString(3, StringUtils.dateToMillis(room.getCreationDate()));
代码示例来源:origin: igniterealtime/Openfire
Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(chatserver.getServiceName());
代码示例来源:origin: igniterealtime/Openfire
ResultSet rs = null;
try {
Long serviceID = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatServiceID(room.getMUCService().getServiceName());
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(LOAD_ROOM);
代码示例来源:origin: igniterealtime/Openfire
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename);
if (mucService == null) {
note.addAttribute("type", "error");
代码示例来源:origin: igniterealtime/Openfire
for (ServiceInfo serviceInfo : result) {
MultiUserChatService service;
service = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(serviceInfo.getSubdomain());
if (service == null) {
XMPPServer.getInstance().getMultiUserChatManager().registerMultiUserChatService(service);
代码示例来源:origin: igniterealtime/Openfire
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()));
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
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;
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
@Override
public void run() {
// If it's registered already, no need to create it. Most likely this is because the service
// is provided by an internal component that registered at startup. This scenario, however,
// should really never occur.
if (!XMPPServer.getInstance().getMultiUserChatManager().isServiceRegistered(subdomain)) {
MultiUserChatService service = new MultiUserChatServiceImpl(subdomain, description, isHidden);
XMPPServer.getInstance().getMultiUserChatManager().registerMultiUserChatService(service);
}
}
代码示例来源:origin: org.igniterealtime.openfire/xmppserver
@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);
}
内容来源于网络,如有侵权,请联系作者删除!