Class TelemetryServiceRegistryImpl<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition,T>
- java.lang.Object
-
- org.opennms.netmgt.telemetry.protocols.registry.impl.TelemetryServiceRegistryImpl<F,BD,T>
-
- All Implemented Interfaces:
ServiceLookup<String,Void>
,TelemetryServiceRegistry<BD,T>
- Direct Known Subclasses:
TelemetryAdapterRegistryImpl
,TelemetryConnectorRegistryImpl
,TelemetryListenerRegistryImpl
,TelemetryParserRegistryImpl
public class TelemetryServiceRegistryImpl<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition,T> extends Object implements TelemetryServiceRegistry<BD,T>, ServiceLookup<String,Void>
Maintains the list of available telemtryd services, aggregating those expose the the service loader and via the OSGi registry.- Author:
- mvrueden
-
-
Constructor Summary
Constructors Constructor Description TelemetryServiceRegistryImpl(java.util.function.Supplier<ServiceLoader<F>> staticServiceSupplier)
TelemetryServiceRegistryImpl(java.util.function.Supplier<ServiceLoader<F>> staticServiceSupplier, long gracePeriodMs, long waitPeriodMs, long lookupDelayMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getService(BD beanDefinition)
<T> T
lookup(String criteria, Void filter)
void
onBind(F serviceFactory, Map properties)
void
onUnbind(F serviceFactory, Map properties)
-
-
-
Constructor Detail
-
TelemetryServiceRegistryImpl
public TelemetryServiceRegistryImpl(java.util.function.Supplier<ServiceLoader<F>> staticServiceSupplier)
-
TelemetryServiceRegistryImpl
public TelemetryServiceRegistryImpl(java.util.function.Supplier<ServiceLoader<F>> staticServiceSupplier, long gracePeriodMs, long waitPeriodMs, long lookupDelayMs)
-
-
Method Detail
-
getService
public T getService(BD beanDefinition)
- Specified by:
getService
in interfaceTelemetryServiceRegistry<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition>
-
lookup
public <T> T lookup(String criteria, Void filter)
- Specified by:
lookup
in interfaceServiceLookup<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition>
-
-