Class XmlCollector
- java.lang.Object
-
- org.opennms.netmgt.collection.api.AbstractServiceCollector
-
- org.opennms.netmgt.collection.api.AbstractRemoteServiceCollector
-
- org.opennms.protocols.xml.collector.XmlCollector
-
- All Implemented Interfaces:
ServiceCollector
public class XmlCollector extends AbstractRemoteServiceCollector
The Class XmlCollector.- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description XmlCollector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionSet
collect(CollectionAgent agent, Map<String,Object> parameters)
Invokes a collection on the object.protected static Map<String,String>
filterParameters(Map<String,Object> input)
Filter out blacklisted key/values out from an input Map.RrdRepository
getRrdRepository(String collectionName)
Retrieve theRrdRepository
configuration for the given collection.Map<String,Object>
getRuntimeAttributes(CollectionAgent agent, Map<String,Object> parameters)
Invoked before every call to#collect(CollectionAgent, EventProxy, Map)
in order to retrieve state/runtime information required for perform the collection.XmlDataCollectionConfigDao
getXmlCollectionDao()
Gets the XML Data Collection DAO.void
initialize()
Log.XmlDataCollection
parseCollection(XmlDataCollection collection, XmlCollectionHandler handler, CollectionAgent agent, Map<String,Object> parameters)
void
setNodeDao(NodeDao nodeDao)
void
setXmlCollectionDao(XmlDataCollectionConfigDao xmlCollectionDao)
Sets the XML Data Collection DAO.-
Methods inherited from class org.opennms.netmgt.collection.api.AbstractRemoteServiceCollector
getEffectiveLocation, marshalParameters, unmarshalParameters
-
Methods inherited from class org.opennms.netmgt.collection.api.AbstractServiceCollector
validateAgent
-
-
-
-
Method Detail
-
getXmlCollectionDao
public XmlDataCollectionConfigDao getXmlCollectionDao()
Gets the XML Data Collection DAO.- Returns:
- the XML Data Collection DAO
-
setXmlCollectionDao
public void setXmlCollectionDao(XmlDataCollectionConfigDao xmlCollectionDao)
Sets the XML Data Collection DAO.- Parameters:
xmlCollectionDao
- the new XML Data Collection DAO
-
initialize
public void initialize() throws CollectionInitializationException
Log.- Specified by:
initialize
in interfaceServiceCollector
- Overrides:
initialize
in classAbstractServiceCollector
- Throws:
CollectionInitializationException
-
getRuntimeAttributes
public Map<String,Object> getRuntimeAttributes(CollectionAgent agent, Map<String,Object> parameters)
Description copied from interface:ServiceCollector
Invoked before every call to#collect(CollectionAgent, EventProxy, Map)
in order to retrieve state/runtime information required for perform the collection. This call will always be performed in OpenNMS.- Specified by:
getRuntimeAttributes
in interfaceServiceCollector
- Overrides:
getRuntimeAttributes
in classAbstractServiceCollector
- Parameters:
agent
- Includes details about to the agent from which we wish to collect.parameters
- Includes the service parameters defined in collectd-configuration.xml.- Returns:
- Additional attributes, which should be added to the parameter map before calling
#collect(CollectionAgent, EventProxy, Map)
.
-
parseCollection
public XmlDataCollection parseCollection(XmlDataCollection collection, XmlCollectionHandler handler, CollectionAgent agent, Map<String,Object> parameters)
-
collect
public CollectionSet collect(CollectionAgent agent, Map<String,Object> parameters) throws CollectionException
Description copied from interface:ServiceCollector
Invokes a collection on the object. This call will be performed in both OpenNMS and Minion.- Parameters:
agent
- aorg.opennms.netmgt.collectd.CollectionAgent
object.parameters
- aMap
object.- Returns:
- a
org.opennms.netmgt.config.collector.CollectionSet
object. - Throws:
CollectionException
-
getRrdRepository
public RrdRepository getRrdRepository(String collectionName)
Description copied from interface:ServiceCollector
Retrieve theRrdRepository
configuration for the given collection. This call will always be performed in OpenNMS.- Parameters:
collectionName
- aString
object.- Returns:
- a
RrdRepository
object.
-
setNodeDao
public void setNodeDao(NodeDao nodeDao)
-
-