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


Java Reference类代码示例

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


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

示例1: bindExtensionService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(
        policy = ReferencePolicy.DYNAMIC,
        service = RuntimeExtension.class,
        cardinality = ReferenceCardinality.MULTIPLE
)
@SuppressWarnings("unused")
protected synchronized void bindExtensionService(RuntimeExtension extension, Map<String, Object> properties) {
    Integer newPriority = PropertiesUtil.toInteger(properties.get(Constants.SERVICE_RANKING), 0);
    String extensionName = PropertiesUtil.toString(properties.get(RuntimeExtension.NAME), "");
    Integer priority = PropertiesUtil.toInteger(mappingPriorities.get(extensionName), 0);
    if (newPriority > priority) {
        mapping = Collections.unmodifiableMap(add(mapping, extension, extensionName));
        mappingPriorities.put(extensionName, newPriority);
    } else {
        if (!mapping.containsKey(extensionName)) {
            mapping = Collections.unmodifiableMap(add(mapping, extension, extensionName));
            mappingPriorities.put(extensionName, newPriority);
        }
    }

}
 
开发者ID:deepthinkit,项目名称:patternlab-for-sling,代码行数:22,代码来源:ExtensionRegistryService.java

示例2: setItemRegistry

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setItemRegistry(ItemRegistry itemRegistry) {
    if (this.itemRegistry == null) {
        this.itemRegistry = itemRegistry;
        // this.itemRegistry.addRegistryChangeListener(registryChangeListener);
    }
}
 
开发者ID:ghys,项目名称:habot,代码行数:8,代码来源:OpenNLPInterpreter.java

示例3: setExceptionMapper

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(
	cardinality = MULTIPLE, policyOption = GREEDY,
	target = "(liferay.apio.architect.exception.mapper=true)"
)
public void setExceptionMapper(
	ServiceReference<ExceptionMapper> serviceReference,
	ExceptionMapper exceptionMapper) {

	_exceptionMappers.add(exceptionMapper);
}
 
开发者ID:liferay,项目名称:com-liferay-apio-architect,代码行数:11,代码来源:ApioApplication.java

示例4: registerIdP

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(
        name = "org.wso2.carbon.analytics.idp.client.core.api.IdPClient",
        service = IdPClient.class,
        cardinality = ReferenceCardinality.MANDATORY,
        policy = ReferencePolicy.DYNAMIC,
        unbind = "unregisterIdP"
)
protected void registerIdP(IdPClient client) {
    HttpIODataHolder.getInstance().setClient(client);
}
 
开发者ID:wso2-extensions,项目名称:siddhi-io-http,代码行数:11,代码来源:ServiceComponent.java

示例5: setGroupLocalService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setGroupLocalService(GroupLocalService groupLocalService) {

	_groupLocalService = groupLocalService;
}
 
开发者ID:peerkar,项目名称:liferay-gsearch,代码行数:6,代码来源:WebContentStructureFacetTranslator.java

示例6: setTaskService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setTaskService(TaskService taskService) {
    this.taskService = taskService;
}
 
开发者ID:apache,项目名称:aries-jpa,代码行数:5,代码来源:TasklistAdder.java

示例7: setDLAppService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setDLAppService(
	DLAppService dLAppService) {

	_dLAppService = dLAppService;
}
 
开发者ID:peerkar,项目名称:liferay-gsearch,代码行数:7,代码来源:DLFileEntryItemBuilder.java

示例8: setQueryParamsBuilder

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setQueryParamsBuilder(QueryParamsBuilder queryParamsBuilder) {

	_queryParamsBuilder = queryParamsBuilder;
}
 
开发者ID:peerkar,项目名称:liferay-gsearch,代码行数:6,代码来源:GetSearchResultsMVCResourceCommand.java

示例9: setVoiceManager

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setVoiceManager(VoiceManager voiceManager) {
    this.voiceManager = voiceManager;
}
 
开发者ID:ghys,项目名称:habot,代码行数:5,代码来源:HABotResource.java

示例10: setExportImportConfigurationLocalService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setExportImportConfigurationLocalService(
        ExportImportConfigurationLocalService exportImportConfigurationLocalService) {

    _exportImportConfigurationLocalService = exportImportConfigurationLocalService;
}
 
开发者ID:inofix,项目名称:ch-inofix-data-manager,代码行数:7,代码来源:ImportDataMessageListener.java

示例11: setItemRegistry

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setItemRegistry(ItemRegistry itemRegistry) {
    this.itemRegistry = itemRegistry;
}
 
开发者ID:ghys,项目名称:habot,代码行数:5,代码来源:HistoryHourlyGraphSkill.java

示例12: setEventPublisher

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setEventPublisher(EventPublisher eventPublisher) {
    if (this.eventPublisher == null) {
        this.eventPublisher = eventPublisher;
    }
}
 
开发者ID:ghys,项目名称:habot,代码行数:7,代码来源:OpenNLPInterpreter.java

示例13: addSkill

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)
public void addSkill(Skill skill) {
    this.skills.put(skill.getIntentId(), skill);
    // reset the trainer
    this.intentTrainer = null;
}
 
开发者ID:ghys,项目名称:habot,代码行数:7,代码来源:OpenNLPInterpreter.java

示例14: setTaskRecordLocalService

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setTaskRecordLocalService(TaskRecordLocalService taskRecordLocalService) {
    _taskRecordLocalService = taskRecordLocalService;
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:5,代码来源:TaskRecordActivityInterpreter.java

示例15: setPortlet

import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Override
@Reference(target = "(javax.portlet.name=" + PortletKeys.TIMETRACKER + ")", unbind = "-")
public void setPortlet(Portlet portlet) {
    super.setPortlet(portlet);
}
 
开发者ID:inofix,项目名称:ch-inofix-timetracker,代码行数:6,代码来源:TimetrackerPanelApp.java


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