当前位置: 首页>>代码示例>>Java>>正文


Java PropertyEventDispatcher类代码示例

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


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


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