Class SFlowTelemetryAdapter
- java.lang.Object
-
- org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
-
- org.opennms.netmgt.telemetry.protocols.collection.AbstractCollectionAdapter
-
- org.opennms.netmgt.telemetry.protocols.collection.AbstractScriptedCollectionAdapter
-
- org.opennms.netmgt.telemetry.protocols.sflow.adapter.SFlowTelemetryAdapter
-
- All Implemented Interfaces:
Adapter
public class SFlowTelemetryAdapter extends AbstractScriptedCollectionAdapter
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractCollectionAdapter
bundleContext
-
Fields inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
adapterConfig, logParsingTimer, packetsPerLogHistogram
-
-
Constructor Summary
Constructors Constructor Description SFlowTelemetryAdapter(AdapterDefinition adapterConfig, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.stream.Stream<CollectionSetWithAgent>
handleCollectionMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
Build a collection set from the given message.void
setCollectionAgentFactory(CollectionAgentFactory collectionAgentFactory)
void
setInterfaceToNodeCache(InterfaceToNodeCache interfaceToNodeCache)
-
Methods inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractScriptedCollectionAdapter
destroy, getCollectionBuilder, getScript, setScript
-
Methods inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractCollectionAdapter
getThresholdingService, handleMessage, setBundleContext, setFilterDao, setPersisterFactory, setThresholdingService
-
Methods inherited from class org.opennms.netmgt.telemetry.protocols.collection.AbstractAdapter
handleMessageLog
-
-
-
-
Constructor Detail
-
SFlowTelemetryAdapter
public SFlowTelemetryAdapter(AdapterDefinition adapterConfig, com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
handleCollectionMessage
public java.util.stream.Stream<CollectionSetWithAgent> handleCollectionMessage(TelemetryMessageLogEntry message, TelemetryMessageLog messageLog)
Description copied from class:AbstractCollectionAdapter
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.- Specified by:
handleCollectionMessage
in classAbstractCollectionAdapter
- 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
-
setCollectionAgentFactory
public void setCollectionAgentFactory(CollectionAgentFactory collectionAgentFactory)
-
setInterfaceToNodeCache
public void setInterfaceToNodeCache(InterfaceToNodeCache interfaceToNodeCache)
-
-