Class AbstractCollectionAdapter
- java.lang.Object
-
- org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
-
- org.opennms.netmgt.telemetry.protocols.collection.AbstractCollectionAdapter
-
- All Implemented Interfaces:
Adapter
- Direct Known Subclasses:
AbstractScriptedCollectionAdapter
,BmpIntegrationAdapter
,BmpTelemetryAdapter
public abstract class AbstractCollectionAdapter extends AbstractAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected org.osgi.framework.BundleContext
bundleContext
-
Fields inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
adapterConfig, LOG, logParsingTimer, packetsPerLogHistogram
-
-
Constructor Summary
Constructors Constructor Description AbstractCollectionAdapter(AdapterDefinition adapterConfig, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ThresholdingService
getThresholdingService()
abstract java.util.stream.Stream<CollectionSetWithAgent>
handleCollectionMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
Build a collection set from the given message.void
handleMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
void
setBundleContext(org.osgi.framework.BundleContext bundleContext)
void
setFilterDao(FilterDao filterDao)
void
setPersisterFactory(PersisterFactory persisterFactory)
void
setThresholdingService(ThresholdingService thresholdingService)
-
Methods inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
destroy, handleMessageLog
-
-
-
-
Constructor Detail
-
AbstractCollectionAdapter
public AbstractCollectionAdapter(AdapterDefinition adapterConfig, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
handleCollectionMessage
public abstract java.util.stream.Stream<CollectionSetWithAgent> handleCollectionMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
Build a collection set from the given message. The message log is also provided in case the log contains additional meta-data required. IMPORTANT: Implementations of this method must be thread-safe.- Parameters:
message
- message to be converted into a collection setmessageLog
- message log to which the message belongs- Returns:
- a
CollectionSetWithAgent
or an empty value if nothing should be persisted - Throws:
java.lang.Exception
- if an error occured while generating the collection set
-
handleMessage
public final void handleMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
- Specified by:
handleMessage
in classAbstractAdapter
-
setFilterDao
public void setFilterDao(FilterDao filterDao)
-
setPersisterFactory
public void setPersisterFactory(PersisterFactory persisterFactory)
-
getThresholdingService
public ThresholdingService getThresholdingService()
-
setThresholdingService
public void setThresholdingService(ThresholdingService thresholdingService)
-
setBundleContext
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
-
-