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<java.lang.String,java.lang.Void>
,TelemetryServiceRegistry<BD,T>
- Direct Known Subclasses:
TelemetryAdapterRegistryImpl
,TelemetryConnectorRegistryImpl
,TelemetryListenerRegistryImpl
,TelemetryParserRegistryImpl
public class TelemetryServiceRegistryImpl<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition,T> extends java.lang.Object implements TelemetryServiceRegistry<BD,T>, ServiceLookup<java.lang.String,java.lang.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<java.util.ServiceLoader<F>> staticServiceSupplier)
TelemetryServiceRegistryImpl(java.util.function.Supplier<java.util.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(java.lang.String criteria, java.lang.Void filter)
void
onBind(F serviceFactory, java.util.Map properties)
void
onUnbind(F serviceFactory, java.util.Map properties)
-
-
-
Constructor Detail
-
TelemetryServiceRegistryImpl
public TelemetryServiceRegistryImpl(java.util.function.Supplier<java.util.ServiceLoader<F>> staticServiceSupplier)
-
TelemetryServiceRegistryImpl
public TelemetryServiceRegistryImpl(java.util.function.Supplier<java.util.ServiceLoader<F>> staticServiceSupplier, long gracePeriodMs, long waitPeriodMs, long lookupDelayMs)
-
-
Method Detail
-
onBind
public void onBind(F serviceFactory, java.util.Map properties)
-
onUnbind
public void onUnbind(F serviceFactory, java.util.Map properties)
-
getService
public T getService(BD beanDefinition)
- Specified by:
getService
in interfaceTelemetryServiceRegistry<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition>
-
lookup
public <T> T lookup(java.lang.String criteria, java.lang.Void filter)
- Specified by:
lookup
in interfaceServiceLookup<F extends TelemetryBeanFactory,BD extends TelemetryBeanDefinition>
-
-