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


Java PropertyEventDispatcher.addListener方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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:surevine,项目名称:openfire-bespoke,代码行数:21,代码来源:UserServicePlugin.java

示例7: 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

示例8: 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

示例9: 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:idwanglu2010,项目名称:openfire,代码行数:14,代码来源:RemoteRosterPlugin.java

示例10: 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

示例11: 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

示例12: initializePlugin

import org.jivesoftware.util.PropertyEventDispatcher; //导入方法依赖的package包/类
public void initializePlugin(PluginManager manager, File pluginDirectory) {
    // Add filter to filter chain builder
    ConnectionManagerImpl connManager = (ConnectionManagerImpl) XMPPServer.getInstance().getConnectionManager();
    defaultPortFilter = new RawPrintFilter("C2S");
    SocketAcceptor socketAcceptor = connManager.getSocketAcceptor();
    if (socketAcceptor != null) {
        socketAcceptor.getFilterChain().addBefore("xmpp", "rawDebugger", defaultPortFilter);
    }
    oldPortFilter = new RawPrintFilter("SSL");
    SocketAcceptor sslAcceptor = connManager.getSSLSocketAcceptor();
    if (sslAcceptor != null) {
        sslAcceptor.getFilterChain().addBefore("xmpp", "rawDebugger", oldPortFilter);
    }

    componentPortFilter = new RawPrintFilter("ExComp");
    SocketAcceptor componentAcceptor = connManager.getComponentAcceptor();
    if (componentAcceptor != null) {
        componentAcceptor.getFilterChain().addBefore("xmpp", "rawDebugger", componentPortFilter);
    }

    multiplexerPortFilter = new RawPrintFilter("CM");
    SocketAcceptor multiplexerAcceptor = connManager.getMultiplexerSocketAcceptor();
    if (multiplexerAcceptor != null) {
        multiplexerAcceptor.getFilterChain().addBefore("xmpp", "rawDebugger", 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:idwanglu2010,项目名称:openfire,代码行数:35,代码来源:DebuggerPlugin.java

示例13: initializePlugin

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

		Log.info("B9 - Starting plugin.");
		Log.debug("B9 - Starting plugin.");

		pluginManager = manager;
		sessionManager = SessionManager.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);

		if (b9SocketEnabled) {
                	Log.info("B9 - Starting bind on port " + b9Port + ".");
                	Log.debug("B9 - Starting bind on port " + b9Port + ".");
                	b9d_srv.startServer();
		}
        }
 
开发者ID:mhterres,项目名称:b9,代码行数:31,代码来源:B9Plugin.java

示例14: HttpBindManager

import org.jivesoftware.util.PropertyEventDispatcher; //导入方法依赖的package包/类
private HttpBindManager() {
    // Configure Jetty logging to a more reasonable default.
    System.setProperty("org.eclipse.jetty.util.log.class", "org.jivesoftware.util.log.util.JettyLog");
    // JSP 2.0 uses commons-logging, so also override that implementation.
    System.setProperty("org.apache.commons.logging.LogFactory", "org.jivesoftware.util.log.util.CommonsLogFactory");

    PropertyEventDispatcher.addListener(new HttpServerPropertyListener());
    this.httpSessionManager = new HttpSessionManager();
    contexts = new ContextHandlerCollection();
}
 
开发者ID:coodeer,项目名称:g3server,代码行数:11,代码来源:HttpBindManager.java

示例15: 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:idwanglu2010,项目名称:openfire,代码行数:12,代码来源:SearchPlugin.java


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