Java Code Examples for org.osgi.service.component.annotations.ReferenceCardinality#OPTIONAL
The following examples show how to use
org.osgi.service.component.annotations.ReferenceCardinality#OPTIONAL .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
@Override @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setEventPublisher(EventPublisher eventPublisher) { super.setEventPublisher(eventPublisher); for (Item item : getItems()) { ((GenericItem) item).setEventPublisher(eventPublisher); } }
Example 2
Source File: MicroservicesServerSC.java From msf4j with Apache License 2.0 | 5 votes |
@Reference( name = "session-manager", service = SessionManager.class, cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, unbind = "removeSessionManager" ) protected void addSessionManager(SessionManager sessionManager, Map properties) { }
Example 3
Source File: GoogleApiFactory.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
@Reference(policy=ReferencePolicy.DYNAMIC, cardinality=ReferenceCardinality.OPTIONAL) public void setProxyService(IProxyService proxyService) { this.proxyService = proxyService; this.proxyService.addProxyChangeListener(proxyChangeListener); proxyFactory.setProxyService(this.proxyService); if (transportCache != null) { transportCache.invalidateAll(); } }
Example 4
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setUnitProvider(UnitProvider unitProvider) { this.unitProvider = unitProvider; for (Item item : getItems()) { ((GenericItem) item).setUnitProvider(unitProvider); } }
Example 5
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setStateDescriptionService(StateDescriptionService stateDescriptionService) { this.stateDescriptionService = stateDescriptionService; for (Item item : getItems()) { ((GenericItem) item).setStateDescriptionService(stateDescriptionService); } }
Example 6
Source File: IdentityCoreServiceComponent.java From carbon-identity-framework with Apache License 2.0 | 5 votes |
/** * * @param client */ @Reference( name = "is.migration.client", service = MigrationClient.class, cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, unbind = "unsetMigrationClient" ) protected void setMigrationClient(MigrationClient client) { migrationClient = client; }
Example 7
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setCommandDescriptionService(CommandDescriptionService commandDescriptionService) { this.commandDescriptionService = commandDescriptionService; for (Item item : getItems()) { ((GenericItem) item).setCommandDescriptionService(commandDescriptionService); } }
Example 8
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 5 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setItemStateConverter(ItemStateConverter itemStateConverter) { this.itemStateConverter = itemStateConverter; for (Item item : getItems()) { ((GenericItem) item).setItemStateConverter(itemStateConverter); } }
Example 9
Source File: DataSourceServiceComponent.java From micro-integrator with Apache License 2.0 | 5 votes |
@Reference( name = "server.configuration.service", service = org.wso2.micro.integrator.core.services.CarbonServerConfigurationService.class, cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, unbind = "unsetServerConfigurationService") protected void setServerConfigurationService(CarbonServerConfigurationService serverConfigurationService) { if (log.isDebugEnabled()) { log.debug("ServerConfigurationService acquired"); } DataSourceServiceComponent.serverConfigurationService = serverConfigurationService; this.checkInitTenantUserDataSources(); }
Example 10
Source File: HABotResource.java From org.openhab.ui.habot with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setCardRegistry(CardRegistry cardRegistry) { this.cardRegistry = cardRegistry; }
Example 11
Source File: HABotResource.java From org.openhab.ui.habot with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setItemNamedAttributesResolver(ItemResolver itemResolver) { this.itemResolver = itemResolver; }
Example 12
Source File: ItemRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setManagedProvider(ManagedItemProvider provider) { super.setManagedProvider(provider); }
Example 13
Source File: HABotResource.java From org.openhab.ui.habot with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setNotificationService(NotificationService notificationService) { this.notificationService = notificationService; }
Example 14
Source File: HABotResource.java From org.openhab.ui.habot with Eclipse Public License 1.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setVoiceManager(VoiceManager voiceManager) { this.voiceManager = voiceManager; }
Example 15
Source File: UserRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setManagedProvider(ManagedUserProvider managedProvider) { super.setManagedProvider(managedProvider); super.addProvider(managedProvider); }
Example 16
Source File: RuleRegistryImpl.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) @Override protected void setEventPublisher(EventPublisher eventPublisher) { super.setEventPublisher(eventPublisher); }
Example 17
Source File: AuthenticationHandler.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setAuthenticationManager(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; }
Example 18
Source File: UIComponentSitemapProvider.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setComponentRegistryFactory(UIComponentRegistryFactory componentRegistryFactory) { this.componentRegistryFactory = componentRegistryFactory; this.sitemapComponentRegistry = this.componentRegistryFactory.getRegistry(SITEMAP_NAMESPACE); this.sitemapComponentRegistry.addRegistryChangeListener(this); }
Example 19
Source File: ConfigDescriptionValidatorImpl.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) protected void setConfigDescriptionRegistry(ConfigDescriptionRegistry configDescriptionRegistry) { this.configDescriptionRegistry = configDescriptionRegistry; }
Example 20
Source File: ScriptItemRefresher.java From openhab-core with Eclipse Public License 2.0 | 4 votes |
@Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC) public void setItemRegistry(ItemRegistry itemRegistry) { this.itemRegistry = itemRegistry; this.itemRegistry.addRegistryChangeListener(this); }