本文整理了Java中org.jivesoftware.openfire.XMPPServer
类的一些代码示例,展示了XMPPServer
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMPPServer
类的具体详情如下:
包路径:org.jivesoftware.openfire.XMPPServer
类名称:XMPPServer
[英]The main XMPP server that will load, initialize and start all the server's modules. The server is unique in the JVM and could be obtained by using the #getInstance() method.
The loaded modules will be initialized and may access through the server other modules. This means that the only way for a module to locate another module is through the server. The server maintains a list of loaded modules.
After starting up all the modules the server will load any available plugin. For more information see: org.jivesoftware.openfire.container.PluginManager.
A configuration file keeps the server configuration. This information is required for the server to work correctly. The server assumes that the configuration file is named openfire.xml and is located in the conf folder. The folder that keeps the configuration file must be located under the home folder. The server will try different methods to locate the home folder.
代码示例来源:origin: igniterealtime/Openfire
public PrivacyList(String username, String name, boolean isDefault, Element listElement) {
this.userJID = XMPPServer.getInstance().createJID(username, null, true);
this.name = name;
this.isDefault = isDefault;
// Set the new list items
updateList(listElement);
}
代码示例来源:origin: igniterealtime/Openfire
/**
* Returns the fully-qualifed domain name of this chat service.
* The domain is composed by the service name and the
* name of the XMPP server where the service is running.
*
* @return the file transfer server domain (service name + host name).
*/
public String getServiceDomain() {
return proxyServiceName + "." + XMPPServer.getInstance().getServerInfo().getXMPPDomain();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
messageStrategy = server.getOfflineMessageStrategy();
routingTable = server.getRoutingTable();
sessionManager = server.getSessionManager();
multicastRouter = server.getMulticastRouter();
userManager = server.getUserManager();
serverName = server.getServerInfo().getXMPPDomain();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
infoHandler = server.getIQDiscoInfoHandler();
itemsHandler = server.getIQDiscoItemsHandler();
messageStore = server.getOfflineMessageStore();
userManager = server.getUserManager();
routingTable = server.getRoutingTable();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
iqRouter = server.getIQRouter();
messageRouter = server.getMessageRouter();
presenceRouter = server.getPresenceRouter();
}
}
代码示例来源:origin: igniterealtime/Openfire
public void pluginsMonitored()
{
Log.debug( "Received plugin monitor event! Plugins should now be loaded." );
// Stop listening for plugin events
XMPPServer.getInstance().getPluginManager().removePluginManagerListener( this );
// Start listeners
startListeners();
}
} );
代码示例来源:origin: igniterealtime/Openfire
@Override
public void run() {
XMPPServer.getInstance().getMultiUserChatManager().unregisterMultiUserChatService(subdomain);
}
代码示例来源:origin: igniterealtime/Openfire
/**
* @deprecated Obtain and use the corresponding {@link org.jivesoftware.openfire.spi.ConnectionListener} instead.
*/
@Deprecated
public static boolean isServiceEnabled() {
ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
return connectionManager.isComponentListenerEnabled();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
TaskEngine.getInstance().scheduleAtFixedRate(new TimeoutTask(), 5000, 5000);
serverName = server.getServerInfo().getXMPPDomain();
routingTable = server.getRoutingTable();
multicastRouter = server.getMulticastRouter();
iqHandlers.addAll(server.getIQHandlers());
sessionManager = server.getSessionManager();
userManager = server.getUserManager();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
localServer = server;
serverName = server.getServerInfo().getXMPPDomain();
routingTable = server.getRoutingTable();
deliverer = server.getPacketDeliverer();
presenceManager = server.getPresenceManager();
rosterManager = server.getRosterManager();
userManager = server.getUserManager();
}
}
代码示例来源:origin: igniterealtime/Openfire
iq.setTo(packet.getFrom());
String serverName = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
iq.setFrom(serverName);
verAttributes.put(packetId, caps);
final IQRouter iqRouter = XMPPServer.getInstance().getIQRouter();
iqRouter.addIQResultListener(packetId, this);
iqRouter.route(iq);
代码示例来源:origin: igniterealtime/Openfire
public PubSubServiceInfo(PubSubService pubSubService) {
if (pubSubService == null) {
throw new IllegalArgumentException("Argument 'pubSubService' cannot be null.");
}
this.pubSubService = pubSubService;
xmppServer = XMPPServer.getInstance();
pubSubModule = xmppServer.getPubSubModule();
groupManager = GroupManager.getInstance();
userManager = xmppServer.getUserManager();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
serverName = server.getServerInfo().getXMPPDomain();
routingTable = server.getRoutingTable();
updateHandler = server.getPresenceUpdateHandler();
subscribeHandler = server.getPresenceSubscribeHandler();
presenceManager = server.getPresenceManager();
multicastRouter = server.getMulticastRouter();
sessionManager = server.getSessionManager();
entityCapsManager = EntityCapabilitiesManager.getInstance();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void execute(SessionData sessionData, Element command) {
Element note = command.addElement("note");
Collection<JID> admins = XMPPServer.getInstance().getAdmins();
if (admins.size() <= 0) {
note.addAttribute("type", "error");
String servicename = servicehostname.replace("."+XMPPServer.getInstance().getServerInfo().getXMPPDomain(), "");
MultiUserChatService mucService;
mucService = XMPPServer.getInstance().getMultiUserChatManager().getMultiUserChatService(servicename);
if (mucService == null) {
note.addAttribute("type", "error");
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
localServer = server;
rosterManager = server.getRosterManager();
presenceManager = server.getPresenceManager();
deliverer = server.getPacketDeliverer();
messageStore = server.getOfflineMessageStore();
sessionManager = server.getSessionManager();
userManager = server.getUserManager();
routingTable = server.getRoutingTable();
directedPresencesCache = CacheFactory.createCache(PRESENCE_CACHE_NAME);
// TODO Add as route listener (to remove direct presences info for removed routes). Mainly for c2s sessions which is uncommon.
// Listen to cluster events
ClusterManager.addListener(this);
}
代码示例来源:origin: igniterealtime/Openfire
XMPPServer server = XMPPServer.getInstance();
if (server.isLocal(user)) {
try {
getUser(user.getNode());
iq.setFrom(server.getServerInfo().getXMPPDomain());
iq.setTo(user.toBareJID());
iq.setChildElement("query", "http://jabber.org/protocol/disco#info");
server.getIQRouter().addIQResultListener(iq.getID(), this);
synchronized ((user.toBareJID() + MUTEX_SUFFIX).intern()) {
server.getIQRouter().route(iq);
代码示例来源:origin: igniterealtime/Openfire
int clientPortNum = -1;
int componentPortNum = -1;
final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
if ( connectionManager != null )
jmdns = new JmDNS();
String serverName = XMPPServer.getInstance().getServerInfo().getXMPPDomain();
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
this.server = server;
offlinePresenceCache = CacheFactory.createCache("Offline Presence Cache");
lastActivityCache = CacheFactory.createCache("Last Activity Cache");
deliverer = server.getPacketDeliverer();
sessionManager = server.getSessionManager();
userManager = server.getUserManager();
presenceUpdateHandler = server.getPresenceUpdateHandler();
rosterManager = server.getRosterManager();
routingTable = server.getRoutingTable();
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void initialize(XMPPServer server) {
super.initialize(server);
this.server = server;
serverName = server.getServerInfo().getXMPPDomain();
iqRouter = server.getIQRouter();
messageRouter = server.getMessageRouter();
presenceRouter = server.getPresenceRouter();
presenceUpdateHandler = server.getPresenceUpdateHandler();
// Listen to cluster events
ClusterManager.addListener(this);
}
代码示例来源:origin: igniterealtime/Openfire
@Override
public void query(Component component, IQ packet, IQResultListener listener) throws ComponentException {
XMPPServer.getInstance().getIQRouter().addIQResultListener(packet.getID(), listener);
sendPacket(component, packet);
}
内容来源于网络,如有侵权,请联系作者删除!