• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java PropertyEventDispatcher类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jivesoftware.util.PropertyEventDispatcher的典型用法代码示例。如果您正苦于以下问题:Java PropertyEventDispatcher类的具体用法?Java PropertyEventDispatcher怎么用?Java PropertyEventDispatcher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyEventDispatcher类属于org.jivesoftware.util包,在下文中一共展示了PropertyEventDispatcher类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: stopInstance

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
/**
 *  Stops the transport instance if it's running.
 */
public void stopInstance() {
    if (!running) {
        return;
    }

    Log.info("Stopping transport service: "+type.toString());

    transport.shutdown();
    PropertyEventDispatcher.removeListener(this);
    try {
        componentManager.removeComponent(this.subDomain);
    }
    catch (Exception e) {
        Log.error("Error while removing component "+this.subDomain+": ", e);
    }
    transport = null;
    running = false;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:22,代码来源:TransportInstance.java


示例2: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    pluginManager = manager;
    sessionManager = SessionManager.getInstance();
    groupManager = GroupManager.getInstance();
    userManager = UserManager.getInstance();

    // Register as a component.
    componentManager = ComponentManagerFactory.getComponentManager();
    try {
        componentManager.addComponent(serviceName, this);
    }
    catch (Exception e) {
        Log.error(e.getMessage(), e);
    }
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:17,代码来源:BroadcastPlugin.java


示例3: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin() {
    PropertyEventDispatcher.removeListener(this);
    // Unregister component.
    if (componentManager != null) {
        try {
            componentManager.removeComponent(serviceName);
        }
        catch (Exception e) {
            Log.error(e.getMessage(), e);
        }
    }
    componentManager = null;
    userManager = null;
    pluginManager = null;
    sessionManager = null;
    groupManager = null;
    allowedUsers.clear();
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:19,代码来源:BroadcastPlugin.java


示例4: addInterceptors

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
private void addInterceptors()
{
    defaultPortFilter = new RawPrintFilter("C2S");
    oldPortFilter = new RawPrintFilter("SSL");
    componentPortFilter = new RawPrintFilter("ExComp");
    multiplexerPortFilter = new RawPrintFilter("CM");

    // Add filter to filter chain builder
    final ConnectionManagerImpl connManager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager();

    addFilterToChain( connManager.getSocketAcceptor(), RawPrintFilter.FILTER_NAME, defaultPortFilter );
    addFilterToChain( connManager.getSSLSocketAcceptor(), RawPrintFilter.FILTER_NAME, oldPortFilter );
    addFilterToChain( connManager.getComponentAcceptor(), RawPrintFilter.FILTER_NAME, componentPortFilter );
    addFilterToChain( connManager.getMultiplexerSocketAcceptor(), RawPrintFilter.FILTER_NAME, multiplexerPortFilter );

    interpretedPrinter = new InterpretedXMLPrinter();
    if (JiveGlobals.getBooleanProperty("plugin.debugger.interpretedAllowed")) {
        // Add the packet interceptor that prints interpreted XML
        InterceptorManager.getInstance().addInterceptor(interpretedPrinter);
    }
    // Listen to property events
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:24,代码来源:DebuggerPlugin.java


示例5: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin() {
    PropertyEventDispatcher.removeListener(this);
    pluginManager = null;
    try {
        componentManager.removeComponent(serviceName);
        componentManager = null;
    } catch (Exception e) {
        if (componentManager != null) {
            Log.error(e.getMessage(), e);
        }
    }
    serviceName = null;
    userManager = null;
    excludedFields = null;
    serverName = null;
    fieldLookup = null;
    reverseFieldLookup = null;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:19,代码来源:SearchPlugin.java


示例6: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    server = XMPPServer.getInstance();
    userManager = server.getUserManager();
    rosterManager = server.getRosterManager();

    secret = JiveGlobals.getProperty("plugin.userservice.secret", "");
    // If no secret key has been assigned to the user service yet, assign a
    // random one.
    if (secret.equals("")) {
        secret = StringUtils.randomString(8);
        setSecret(secret);
    }

    // See if the service is enabled or not.
    enabled = JiveGlobals.getBooleanProperty("plugin.userservice.enabled", false);

    // See if the HTTP Basic Auth is enabled or not.
    httpBasicAuth = JiveGlobals.getBooleanProperty("plugin.userservice.httpAuth.enabled", false);

    // Get the list of IP addresses that can use this service. An empty list
    // means that this filter is disabled.
    allowedIPs = StringUtils.stringToCollection(JiveGlobals.getProperty("plugin.userservice.allowedIPs", ""));

    // Listen to system property events
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:27,代码来源:UserServicePlugin.java


示例7: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    secret = JiveGlobals.getProperty("plugin.restapi.secret", "");
    // If no secret key has been assigned, assign a random one.
    if ("".equals(secret)) {
        secret = StringUtils.randomString(16);
        setSecret(secret);
    }
    
    // See if Custom authentication filter has been defined
    customAuthFilterClassName = JiveGlobals.getProperty("plugin.restapi.customAuthFilter", "");
    
    // See if the service is enabled or not.
    enabled = JiveGlobals.getBooleanProperty("plugin.restapi.enabled", false);

    // See if the HTTP Basic Auth is enabled or not.
    httpAuth = JiveGlobals.getProperty("plugin.restapi.httpAuth", "basic");

    // Get the list of IP addresses that can use this service. An empty list
    // means that this filter is disabled.
    allowedIPs = StringUtils.stringToCollection(JiveGlobals.getProperty("plugin.restapi.allowedIPs", ""));

    // Listen to system property events
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:25,代码来源:RESTServicePlugin.java


示例8: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin()
{
    PropertyEventDispatcher.removeListener(this);

    try {
        for (NodeThread script : scripts.values())
        {
            script.stop();
        }

        executor.shutdown();
    }
    catch (Exception e) {
        //Log.error("NodeJs destroyPlugin ", e);
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:17,代码来源:PluginImpl.java


示例9: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin() {
    PropertyEventDispatcher.removeListener(this);
    pluginManager = null;
    try {
        componentManager.removeComponent(serviceName);
        componentManager = null;
    }
    catch (Exception e) {
        if (componentManager != null) {
            Log.error(e.getMessage(), e);
        }
    }
    serviceName = null;
    userManager = null;
    exculudedFields = null;
    serverName = null;
    fieldLookup = null;
    reverseFieldLookup = null;
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:20,代码来源:SearchPlugin.java


示例10: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    server = XMPPServer.getInstance();
    userManager = server.getUserManager();

    secret = JiveGlobals.getProperty("plugin.userservice.secret", "");
    // If no secret key has been assigned to the user service yet, assign a random one.
    if (secret.equals("")){
        secret = StringUtils.randomString(8);
        setSecret(secret);
    }
    
    // See if the service is enabled or not.
    enabled = JiveGlobals.getBooleanProperty("plugin.userservice.enabled", false);

    // Get the list of IP addresses that can use this service. An empty list means that this filter is disabled.
    allowedIPs = StringUtils.stringToCollection(JiveGlobals.getProperty("plugin.userservice.allowedIPs", ""));

    // Listen to system property events
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:21,代码来源:UserServicePlugin.java


示例11: HttpBindManager

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
private HttpBindManager() {
    // JSP 2.0 uses commons-logging, so also override that implementation.
    System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");
    
    JiveGlobals.migrateProperty(HTTP_BIND_ENABLED);
    JiveGlobals.migrateProperty(HTTP_BIND_PORT);
    JiveGlobals.migrateProperty(HTTP_BIND_SECURE_PORT);
    JiveGlobals.migrateProperty(HTTP_BIND_THREADS);
    JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED);
    JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_FOR);
    JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_SERVER);
    JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_HOST);
    JiveGlobals.migrateProperty(HTTP_BIND_FORWARDED_HOST_NAME);
    JiveGlobals.migrateProperty(HTTP_BIND_CORS_ENABLED);
    JiveGlobals.migrateProperty(HTTP_BIND_CORS_ALLOW_ORIGIN);

    PropertyEventDispatcher.addListener(new HttpServerPropertyListener());
    this.httpSessionManager = new HttpSessionManager();
    contexts = new ContextHandlerCollection();
    
    // setup the cache for the allowed origins
    this.setupAllowedOriginsMap();
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:24,代码来源:HttpBindManager.java


示例12: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin() {
	PropertyEventDispatcher.removeListener(this);
	pluginManager = null;
	try {
		componentManager.removeComponent(serviceName);
		componentManager = null;
	} catch (Exception e) {
		if (componentManager != null) {
			Log.error(e.getMessage(), e);
		}
	}
	serviceName = null;
	userManager = null;
	excludedFields = null;
	serverName = null;
	fieldLookup = null;
	reverseFieldLookup = null;
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:19,代码来源:SearchPlugin.java


示例13: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    server = XMPPServer.getInstance();
    userManager = server.getUserManager();
    rosterManager = server.getRosterManager();

    secret = JiveGlobals.getProperty("plugin.userservice.secret", "");
    // If no secret key has been assigned to the user service yet, assign a random one.
    if (secret.equals("")){
        secret = StringUtils.randomString(8);
        setSecret(secret);
    }

    // See if the service is enabled or not.
    enabled = JiveGlobals.getBooleanProperty("plugin.userservice.enabled", false);

    // Get the list of IP addresses that can use this service. An empty list means that this filter is disabled.
    allowedIPs = StringUtils.stringToCollection(JiveGlobals.getProperty("plugin.userservice.allowedIPs", ""));

    // Listen to system property events
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:22,代码来源:UserServicePlugin.java


示例14: initialize

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
@Override
    public void initialize(XMPPServer server) {
        super.initialize(server);
        enabled = JiveGlobals.getBooleanProperty("xmpp.audit.active");
        auditMessage = JiveGlobals.getBooleanProperty("xmpp.audit.message");
        auditPresence = JiveGlobals.getBooleanProperty("xmpp.audit.presence");
        auditIQ = JiveGlobals.getBooleanProperty("xmpp.audit.iq");
        auditXPath = JiveGlobals.getBooleanProperty("xmpp.audit.xpath");
        // TODO: load xpath values!
//        String[] filters = context.getProperties("xmpp.audit.filter.xpath");
//        for (int i = 0; i < filters.length; i++) {
//            xpath.add(filters[i]);
//        }
        maxTotalSize = JiveGlobals.getIntProperty("xmpp.audit.totalsize", MAX_TOTAL_SIZE);
        maxFileSize = JiveGlobals.getIntProperty("xmpp.audit.filesize", MAX_FILE_SIZE);
        maxDays = JiveGlobals.getIntProperty("xmpp.audit.days", MAX_DAYS);
        logTimeout = JiveGlobals.getIntProperty("xmpp.audit.logtimeout", DEFAULT_LOG_TIMEOUT);
        logDir = JiveGlobals.getProperty("xmpp.audit.logdir", JiveGlobals.getHomeDirectory() +
                File.separator + "logs");
        processIgnoreString(JiveGlobals.getProperty("xmpp.audit.ignore", ""));

        auditor = new AuditorImpl(this);
        auditor.setMaxValues(maxTotalSize, maxFileSize, maxDays);
        auditor.setLogDir(logDir);
        auditor.setLogTimeout(logTimeout);

        interceptor = new AuditorInterceptor();
        processEnabled(enabled);
        PropertyEventDispatcher.addListener(this);
    }
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:31,代码来源:AuditManagerImpl.java


示例15: LdapVCardProvider

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public LdapVCardProvider() {
    // Convert XML based provider setup to Database based
    JiveGlobals.migrateProperty("ldap.vcard-mapping");

    manager = LdapManager.getInstance();
    initTemplate();
    // Listen to property events so that the template is always up to date
    PropertyEventDispatcher.addListener(this);
    // DB vcard provider used for loading properties overwritten in the DB
    defaultProvider = new DefaultVCardProvider();
    // Check of avatars can be overwritten (and stored in the database)
    dbStorageEnabled = JiveGlobals.getBooleanProperty("ldap.override.avatar", false);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:14,代码来源:LdapVCardProvider.java


示例16: init

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
@Override
public void init(ServletConfig servletConfig) {
    try {
        super.init(servletConfig);
        conduit = new XMLRPCConduit();
        PropertyEventDispatcher.addListener(this);

        this.getXmlRpcServer().addInvocationHandler("Manager", conduit);

        AuthCheckFilter.addExclude("kraken/xml-rpc");
    }
    catch (ServletException e) {
        Log.error("Error while loading XMLRPC servlet: ", e);
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:16,代码来源:GatewayXMLRPC.java


示例17: stop

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void stop() {
    archiveTask.cancel();
    archiveTask = null;
    cleanupTask.cancel();
    cleanupTask = null;

    // Remove the statistics.
    StatisticsManager.getInstance().removeStatistic(CONVERSATIONS_KEY);

    PropertyEventDispatcher.removeListener(propertyListener);
    propertyListener = null;
    conversations.clear();
    conversations = null;

    // Archive anything remaining in the queue before quitting.
    new ArchivingTask().run();

    conversationQueue.clear();
    conversationQueue = null;

    messageQueue.clear();
    messageQueue = null;

    conversationListeners.clear();
    conversationListeners = null;

    serverInfo = null;
    InternalComponentManager.getInstance().removeListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:30,代码来源:ConversationManager.java


示例18: destroyPlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void destroyPlugin() {
    // Stop listening to property events
    PropertyEventDispatcher.removeListener(this);
    // Remove filter from filter chain builder
    ConnectionManagerImpl connManager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager();
    removeFilterFromChain( connManager.getSocketAcceptor(), RawPrintFilter.FILTER_NAME );
    removeFilterFromChain( connManager.getSSLSocketAcceptor(), RawPrintFilter.FILTER_NAME );
    removeFilterFromChain( connManager.getComponentAcceptor(), RawPrintFilter.FILTER_NAME );
    removeFilterFromChain( connManager.getMultiplexerSocketAcceptor(), RawPrintFilter.FILTER_NAME );

    // Remove the filters from existing sessions
    if (defaultPortFilter != null) {
        defaultPortFilter.shutdown();
    }
    if (oldPortFilter != null) {
        oldPortFilter.shutdown();
    }
    if (componentPortFilter != null) {
        componentPortFilter.shutdown();
    }
    if (multiplexerPortFilter != null) {
        multiplexerPortFilter.shutdown();
    }

    // Remove the packet interceptor that prints interpreted XML
    InterceptorManager.getInstance().removeInterceptor(interpretedPrinter);

    defaultPortFilter = null;
    oldPortFilter = null;
    componentPortFilter = null;
    interpretedPrinter = null;
    multiplexerPortFilter = null;
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:34,代码来源:DebuggerPlugin.java


示例19: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    pluginManager = manager;

    componentManager = ComponentManagerFactory.getComponentManager();
    try {
        componentManager.addComponent(serviceName, this);
    } catch (ComponentException e) {
        Log.error(e.getMessage(), e);
    }
    PropertyEventDispatcher.addListener(this);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:12,代码来源:SearchPlugin.java


示例20: listenToSettings

import org.jivesoftware.util.PropertyEventDispatcher; //导入依赖的package包/类
/**
 * Registers a listener for JiveGlobals. We might restart our service, if
 * there were some changes for our gateways
 */
private void listenToSettings() {
    _settingsObserver = new RemoteRosterPropertyListener() {
        @Override
        protected void changedProperty(String prop) {
            updateInterceptors(prop);
        }
    };
    PropertyEventDispatcher.addListener(_settingsObserver);
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:14,代码来源:RemoteRosterPlugin.java



注:本文中的org.jivesoftware.util.PropertyEventDispatcher类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ObserverDataConsumer类代码示例发布时间:2022-05-22
下一篇:
Java ExtendedStats类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap