本文整理匯總了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);
}