本文整理汇总了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);
}
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例5: setGroupLocalService
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setGroupLocalService(GroupLocalService groupLocalService) {
_groupLocalService = groupLocalService;
}
示例6: setTaskService
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setTaskService(TaskService taskService) {
this.taskService = taskService;
}
示例7: setDLAppService
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setDLAppService(
DLAppService dLAppService) {
_dLAppService = dLAppService;
}
示例8: setQueryParamsBuilder
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setQueryParamsBuilder(QueryParamsBuilder queryParamsBuilder) {
_queryParamsBuilder = queryParamsBuilder;
}
示例9: setVoiceManager
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setVoiceManager(VoiceManager voiceManager) {
this.voiceManager = voiceManager;
}
示例10: setExportImportConfigurationLocalService
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setExportImportConfigurationLocalService(
ExportImportConfigurationLocalService exportImportConfigurationLocalService) {
_exportImportConfigurationLocalService = exportImportConfigurationLocalService;
}
示例11: setItemRegistry
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = itemRegistry;
}
示例12: setEventPublisher
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference
public void setEventPublisher(EventPublisher eventPublisher) {
if (this.eventPublisher == null) {
this.eventPublisher = eventPublisher;
}
}
示例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;
}
示例14: setTaskRecordLocalService
import org.osgi.service.component.annotations.Reference; //导入依赖的package包/类
@Reference(unbind = "-")
protected void setTaskRecordLocalService(TaskRecordLocalService taskRecordLocalService) {
_taskRecordLocalService = taskRecordLocalService;
}
示例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);
}