Package org.opennms.netmgt.collectd
Class WsManCollector
- java.lang.Object
-
- org.opennms.netmgt.collection.api.AbstractServiceCollector
-
- org.opennms.netmgt.collection.api.AbstractRemoteServiceCollector
-
- org.opennms.netmgt.collectd.WsManCollector
-
- All Implemented Interfaces:
ServiceCollector
public class WsManCollector extends AbstractRemoteServiceCollector
WS-Man Collector- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description WsManCollector()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionSet
collect(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.Object> parameters)
Invokes a collection on the object.RrdRepository
getRrdRepository(java.lang.String collectionName)
Retrieve theRrdRepository
configuration for the given collection.java.util.Map<java.lang.String,java.lang.Object>
getRuntimeAttributes(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.Object> parameters)
Invoked before every call to#collect(CollectionAgent, EventProxy, Map)
in order to retrieve state/runtime information required for perform the collection.void
initialize()
Initialize the collector.static void
processEnumerationResults(Group group, CollectionSetBuilder builder, java.util.function.Supplier<Resource> resourceSupplier, java.util.List<org.w3c.dom.Node> nodes)
Used to build aCollectionSet
from the enumeration results.void
setNodeDao(NodeDao nodeDao)
void
setWSManClientFactory(org.opennms.core.wsman.WSManClientFactory factory)
void
setWSManConfigDao(WSManConfigDao wsManConfigDao)
void
setWSManDataCollectionConfigDao(WSManDataCollectionConfigDao wsManDataCollectionConfigDao)
-
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
-
initialize
public void initialize() throws CollectionInitializationException
Description copied from interface:ServiceCollector
Initialize the collector. This call will be invoked in OpenNMS before any other calls to the collector are made. This function may be invoked several times during the lifetime or the collector.- Specified by:
initialize
in interfaceServiceCollector
- Overrides:
initialize
in classAbstractServiceCollector
- Throws:
CollectionInitializationException
-
getRuntimeAttributes
public java.util.Map<java.lang.String,java.lang.Object> getRuntimeAttributes(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.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)
.
-
collect
public CollectionSet collect(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.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
-
processEnumerationResults
public static void processEnumerationResults(Group group, CollectionSetBuilder builder, java.util.function.Supplier<Resource> resourceSupplier, java.util.List<org.w3c.dom.Node> nodes)
Used to build aCollectionSet
from the enumeration results.
-
getRrdRepository
public RrdRepository getRrdRepository(java.lang.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.
-
setWSManConfigDao
public void setWSManConfigDao(WSManConfigDao wsManConfigDao)
-
setWSManDataCollectionConfigDao
public void setWSManDataCollectionConfigDao(WSManDataCollectionConfigDao wsManDataCollectionConfigDao)
-
setWSManClientFactory
public void setWSManClientFactory(org.opennms.core.wsman.WSManClientFactory factory)
-
setNodeDao
public void setNodeDao(NodeDao nodeDao)
-
-