Class OpenConfigAdapter
- 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.openconfig.adapter.OpenConfigAdapter
-
- All Implemented Interfaces:
Adapter
public class OpenConfigAdapter 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, LOG, logParsingTimer, packetsPerLogHistogram
-
-
Constructor Summary
Constructors Constructor Description OpenConfigAdapter(AdapterDefinition adapterConfig, com.codahale.metrics.MetricRegistry metricRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMode()
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)
void
setMode(java.lang.String mode)
void
setNodeDao(NodeDao nodeDao)
void
setTransactionTemplate(org.springframework.transaction.support.TransactionOperations transactionTemplate)
-
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
-
OpenConfigAdapter
public OpenConfigAdapter(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)
-
setNodeDao
public void setNodeDao(NodeDao nodeDao)
-
setTransactionTemplate
public void setTransactionTemplate(org.springframework.transaction.support.TransactionOperations transactionTemplate)
-
getMode
public java.lang.String getMode()
-
setMode
public void setMode(java.lang.String mode)
-
-