本文整理了Java中org.osgi.service.component.annotations.Reference
类的一些代码示例,展示了Reference
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Reference
类的具体详情如下:
包路径:org.osgi.service.component.annotations.Reference
类名称:Reference
暂无
代码示例来源:origin: eclipse/smarthome
@Reference
void setScheduler(Scheduler scheduler) {
this.scheduler = scheduler;
}
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
@Component(service=BindingsValuesProvider.class)
public class QueryBuilderBindingsValuesProvider implements BindingsValuesProvider {
@Reference
private QueryBuilder queryBuilder;
@Override
public void addBindings(Bindings bindings) {
bindings.put("queryBuilder", queryBuilder);
}
}
代码示例来源:origin: biz.aQute/bndlib
def.name = reference.name();
def.unbind = reference.unbind();
def.updated = reference.updated();
def.bind = method.getName();
def.target = reference.target();
component.references.put(def.name, def);
def.cardinality = reference.cardinality();
def.policy = reference.policy();
def.policyOption = reference.policyOption();
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
@Component(service=ProcessDefinitionFactory.class)
public class RefreshFolderThumbnailsFactory extends ProcessDefinitionFactory<RefreshFolderTumbnails> {
@Reference
private SlingRequestProcessor slingProcessor;
@Reference
RequestResponseFactory reqRspFactory;
@Override
public String getName() {
return "Refresh asset folder thumbnails";
}
@Override
protected RefreshFolderTumbnails createProcessDefinitionInstance() {
return new RefreshFolderTumbnails(reqRspFactory, slingProcessor);
}
}
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
@Component(service=ProcessDefinitionFactory.class)
public class DeepPruneFactory extends AdminOnlyProcessDefinitionFactory<DeepPrune> {
@Reference
private JobManager jobManager;
@Override
public String getName() {
return "Deep Prune";
}
@Override
public DeepPrune createProcessDefinitionInstance() {
return new DeepPrune(jobManager);
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
public void setUnitProvider(UnitProvider unitProvider) {
this.unitProvider = unitProvider;
}
代码示例来源:origin: org.onosproject/onos-cli
/**
* OSGI Component for the ONOS CLI.
*/
@Component(immediate = true)
public class CliComponent {
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected CoreService coreService;
@Activate
public void activate() {
coreService
.registerApplication("org.onosproject.cli");
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
void setDelegate(SchedulerImpl delegate) {
this.delegate = delegate;
}
代码示例来源:origin: osgi/osgi.enroute.examples
@Component
public class LogExampleComponent {
@Reference
private LogService log;
@Activate
void activate() {
log.log(LogService.LOG_INFO, "Hello Lustrous Point!");
}
@Deactivate
void deactivate() {
log.log(LogService.LOG_INFO, "Goodbye!");
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
protected void setSafeCaller(SafeCaller safeCaller) {
this.safeCaller = safeCaller;
}
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
@Component
public class AdobeioHelperImpl implements AdobeioHelper {
@Reference
private HttpClientBuilderFactory clientBuilderFactory;
@Override
public CloseableHttpClient getHttpClient(int timeoutInMilliSeconds) {
RequestConfig requestConfig = RequestConfig.copy(RequestConfig.DEFAULT)
.setSocketTimeout(timeoutInMilliSeconds)
.setConnectTimeout(timeoutInMilliSeconds)
.setConnectionRequestTimeout(timeoutInMilliSeconds)
.build();
return clientBuilderFactory.newBuilder().setDefaultRequestConfig(requestConfig).build();
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
protected void setItemRegistry(ItemRegistry itemRegistry) {
this.itemRegistry = itemRegistry;
}
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
/**
* ACS AEM Commons - AEM Capability Helper
* Provides information about the current AEM installation and what it can and can't do.
*/
@Component(service=AemCapabilityHelper.class)
public class AemCapabilityHelperImpl implements AemCapabilityHelper {
@Reference
private SlingRepository slingRepository;
@Override
public final boolean isOak() throws RepositoryException {
final String repositoryName = slingRepository.getDescriptorValue(SlingRepository.REP_NAME_DESC).getString();
return StringUtils.equalsIgnoreCase("Apache Jackrabbit Oak", repositoryName);
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
protected void setEventAdmin(EventAdmin eventAdmin) {
this.osgiEventAdmin = eventAdmin;
}
代码示例来源:origin: com.cognifide.aet/jobs
@Component
public class JsErrorsCollectorFactory implements CollectorFactory {
@Reference
private ArtifactsDAO artifactsDAO;
@Override
public String getName() {
return JsErrorsCollector.NAME;
}
@Override
public CollectorJob createInstance(CollectorProperties properties, Map<String, String> parameters,
WebCommunicationWrapper webCommunicationWrapper) throws ParametersException {
return new JsErrorsCollector(properties, webCommunicationWrapper, artifactsDAO);
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
protected void setSafeCaller(SafeCaller safeCaller) {
this.safeCaller = safeCaller;
}
代码示例来源:origin: osgi/osgi.enroute.examples
@Component
public class Ping {
@Reference
private EventAdmin admin;
@Reference
private Scheduler scheduler;
private Closeable schedule;
@Activate
void activate() throws Exception {
Event event = new Event("osgi/enroute/ping", new HashMap<>());
schedule = scheduler.schedule(()-> admin.postEvent(event), 1000);
}
@Deactivate
void deactivate() throws IOException {
schedule.close();
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
void setScheduler(Scheduler scheduler) {
this.scheduler = scheduler;
}
代码示例来源:origin: com.cognifide.aet/jobs
@Component
public class CookieCollectorFactory implements CollectorFactory {
@Reference
private ArtifactsDAO artifactsDAO;
@Override
public String getName() {
return CookieCollector.NAME;
}
@Override
public CollectorJob createInstance(CollectorProperties properties, Map<String, String> parameters,
WebCommunicationWrapper webCommunicationWrapper) throws ParametersException {
return new CookieCollector(properties, webCommunicationWrapper.getWebDriver(), artifactsDAO);
}
}
代码示例来源:origin: eclipse/smarthome
@Reference
protected void setMetadataRegistry(MetadataRegistry metadataRegistry) {
this.metadataRegistry = metadataRegistry;
}
内容来源于网络,如有侵权,请联系作者删除!