本文整理汇总了Java中org.xmpp.component.ComponentManagerFactory.setComponentManager方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentManagerFactory.setComponentManager方法的具体用法?Java ComponentManagerFactory.setComponentManager怎么用?Java ComponentManagerFactory.setComponentManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.xmpp.component.ComponentManagerFactory
的用法示例。
在下文中一共展示了ComponentManagerFactory.setComponentManager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExternalComponentManager
import org.xmpp.component.ComponentManagerFactory; //导入方法依赖的package包/类
/**
* Constructs a new ExternalComponentManager that will make connections to
* the specified XMPP server on the given port.
*
* @param host the IP address or name of the XMPP server to connect to (e.g. "example.com").
* @param port the port to connect on.
*/
@Deprecated
public ExternalComponentManager(String host, int port) {
if (host == null) {
throw new IllegalArgumentException("Host of XMPP server cannot be null");
}
this.host = host;
this.port = port;
createDummyLogger();
// Set this ComponentManager as the current component manager
ComponentManagerFactory.setComponentManager(this);
}
示例2: start
import org.xmpp.component.ComponentManagerFactory; //导入方法依赖的package包/类
@Override
public void start() {
// Set this ComponentManager as the current component manager
ComponentManagerFactory.setComponentManager(instance);
XMPPServer server = XMPPServer.getInstance();
serverDomain = server.getServerInfo().getXMPPDomain();
// Set the address of this internal service. component.[domain]
serviceAddress = new JID(null, "component." + serverDomain, null);
if (!server.isSetupMode()) {
// Add a route to this service
server.getRoutingTable().addComponentRoute(getAddress(), this);
}
}
示例3: start
import org.xmpp.component.ComponentManagerFactory; //导入方法依赖的package包/类
@Override
public void start() {
// Set this ComponentManager as the current component manager
ComponentManagerFactory.setComponentManager(instance);
XMPPServer server = XMPPServer.getInstance();
serverDomain = server.getServerInfo().getXMPPDomain();
// Set the address of this internal service. component.[domain]
serviceAddress = new JID(null, "component." + serverDomain, null);
if (!server.isSetupMode()) {
// Add a route to this service
server.getRoutingTable().addComponentRoute(getAddress(), this);
}
}
示例4: ExternalComponentManager
import org.xmpp.component.ComponentManagerFactory; //导入方法依赖的package包/类
/**
* Constructs a new ExternalComponentManager that will make connections to
* the specified XMPP server on the given port.
*
* @param host
* the IP address or name of the XMPP server to connect to (e.g.
* "example.com").
* @param port
* the port to connect on.
*/
public ExternalComponentManager(String host, int port) {
if (host == null) {
throw new IllegalArgumentException(
"Host of XMPP server cannot be null");
}
this.host = host;
this.port = port;
// Set this ComponentManager as the current component manager
ComponentManagerFactory.setComponentManager(this);
}