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


Java Modified类代码示例

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


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

示例1: modified

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Modified
public void modified(ComponentContext context) {
    Dictionary<?, ?> properties = context.getProperties();
    int newTunnelStatsPollFrequency;
    try {
        String s = get(properties, "tunnelStatsPollFrequency");
        newTunnelStatsPollFrequency = isNullOrEmpty(s) ? tunnelStatsPollFrequency : Integer.parseInt(s.trim());

    } catch (NumberFormatException | ClassCastException e) {
        newTunnelStatsPollFrequency = tunnelStatsPollFrequency;
    }

    if (newTunnelStatsPollFrequency != tunnelStatsPollFrequency) {
        tunnelStatsPollFrequency = newTunnelStatsPollFrequency;
        collectors.values().forEach(tsc -> tsc.adjustPollInterval(tunnelStatsPollFrequency));
        log.info("New setting: tunnelStatsPollFrequency={}", tunnelStatsPollFrequency);
    }

}
 
开发者ID:shlee89,项目名称:athena,代码行数:20,代码来源:PcepTunnelProvider.java

示例2: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
/**
 * OSGi component lifecycle listener for actication and modification of this
 * service.
 * 
 * @param componentContext
 *            OSGi component context.
 * @param properties
 *            OSGi configuration properties.
 * @throws Exception
 *             is thrown if the activation or modification of the service
 *             goes wrong.
 */
@Activate
@Modified
protected void activate(ComponentContext componentContext, Map<String, Object> properties) throws Exception {

	// Check if a service tracker for the context path exists and close it.
	if (_serviceTracker != null) {
		_serviceTracker.close();
	}

	// Create a filter for ServletContext components and start tracking.
	Filter filter = FrameworkUtil
			.createFilter("(&(objectClass=" + ServletContext.class.getName() + ")(osgi.web.contextpath=*))");

	_serviceTracker = new ServiceTracker<>(componentContext.getBundleContext(), filter, this);

	_serviceTracker.open();
}
 
开发者ID:fassmus,项目名称:liferay-devcon-2016-hystrix,代码行数:30,代码来源:LiferayHystrixMetricsStreamServlet.java

示例3: modified

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Modified
public void modified(ComponentContext context) {
    Dictionary<?, ?> properties = context.getProperties();
    int newTunnelStatsPollFrequency;
    try {
        String s = get(properties, "tunnelStatsPollFrequency");
        newTunnelStatsPollFrequency = isNullOrEmpty(s) ? tunnelStatsPollFrequency : Integer.parseInt(s.trim());

    } catch (NumberFormatException | ClassCastException e) {
        newTunnelStatsPollFrequency = tunnelStatsPollFrequency;
    }

    if (newTunnelStatsPollFrequency != tunnelStatsPollFrequency) {
        tunnelStatsPollFrequency = newTunnelStatsPollFrequency;
        collectors.values().forEach(tsc -> tsc.adjustPollInterval(tunnelStatsPollFrequency));
        log.info("New setting: tunnelStatsPollFrequency={}", tunnelStatsPollFrequency);
    }
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:19,代码来源:PcepTunnelProvider.java

示例4: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected final void activate(Configuration config) {
    booleanProp = config.servicename_propertyname_boolean();
    stringProp = config.servicename_propertyname_string();
    dropdownProp = config.servicename_propertyname_dropdown();
    stringArrayProp = config.servicename_propertyname_string_array();
    passwordProp = config.servicename_propertyname_password().toCharArray();
    longProp = config.servicename_propertyname_long();
}
 
开发者ID:nateyolles,项目名称:aem-osgi-annotation-demo,代码行数:11,代码来源:SampleOsgiServiceImpl.java

示例5: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate(Map<Object, Object> properties) {

    _timetrackerConfiguration = ConfigurableUtil.createConfigurable(
            TimetrackerConfiguration.class, properties);
    
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:9,代码来源:TimetrackerConfigurationAction.java

示例6: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate(Map<Object, Object> properties) {

    _contactManagerConfiguration = ConfigurableUtil.createConfigurable(
            ContactManagerConfiguration.class, properties);
    
}
 
开发者ID:inofix,项目名称:ch-inofix-contact-manager,代码行数:9,代码来源:ContactManagerConfigurationAction.java

示例7: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
			TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(), 1, TimeUnit.MINUTE));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:TimerScheduler.java

示例8: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(),
			45, TimeUnit.SECOND));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:DossierPullScheduler.java

示例9: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
			TriggerFactoryUtil.createTrigger(getEventListenerClass(), getEventListenerClass(), 45, TimeUnit.SECOND));
	_schedulerEngineHelper.register(this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:8,代码来源:DossierSyncScheduler.java

示例10: modified

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Modified
protected void modified(final Map<String, Object> properties) {
    final Object value = properties.get("osgi.feature.myfeature");
    if (value instanceof Boolean) {
        isFeatureEnabled = (boolean) value;
    }
    doStuff();
}
 
开发者ID:amitjoy,项目名称:feature-flags-for-osgi,代码行数:9,代码来源:ExampleFeatureFlagOSGiR4.java

示例11: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate(Map<Object, Object> properties) {

    _dataManagerConfiguration = ConfigurableUtil.createConfigurable(
            DataManagerConfiguration.class, properties);
    
}
 
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:9,代码来源:DataManagerConfigurationAction.java

示例12: activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void activate() {
	schedulerEntryImpl.setTrigger(
		TriggerFactoryUtil.createTrigger(
			getEventListenerClass(), getEventListenerClass(), 15,
			TimeUnit.MINUTE));

	_schedulerEngineHelper.register(
		this, schedulerEntryImpl, DestinationNames.SCHEDULER_DISPATCH);
}
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:12,代码来源:BladeSchedulerEntryMessageListener.java

示例13: modified

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Modified
protected void modified(Map<String, Object> config) {
    // We update instead of replace the configuration object, so that if the user updates the
    // configuration, the values are automatically available in all handlers. Because they all
    // share the same instance.
    configuration.update(new Configuration(config).as(NetworkBindingConfiguration.class));
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:8,代码来源:NetworkHandlerFactory.java

示例14: modified

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Override
@Modified
protected void modified(Map<String, Object> config) {
    super.modified(config);
    // We update instead of replace the configuration object, so that if the user updates the
    // configuration, the values are automatically available in all handlers. Because they all
    // share the same instance.
    configuration.update(new Configuration(config).as(NetworkBindingConfiguration.class));
}
 
开发者ID:openhab,项目名称:openhab2-addons,代码行数:10,代码来源:NetworkDiscoveryService.java

示例15: Activate

import org.osgi.service.component.annotations.Modified; //导入依赖的package包/类
@Activate
@Modified
protected void Activate(Configuration config) {
    enabled = config.enabled();
}
 
开发者ID:nateyolles,项目名称:aem-osgi-annotation-demo,代码行数:6,代码来源:SampleOsgiServlet.java


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