當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。