Class AbstractRemoteServiceCollector
- java.lang.Object
-
- org.opennms.netmgt.collection.api.AbstractServiceCollector
-
- org.opennms.netmgt.collection.api.AbstractRemoteServiceCollector
-
- All Implemented Interfaces:
ServiceCollector
- Direct Known Subclasses:
HttpCollector,JdbcCollector,JMXCollector,NSClientCollector,PrometheusCollector,VmwareCimCollector,VmwareCollector,WmiCollector,WsManCollector,XmlCollector
public abstract class AbstractRemoteServiceCollector extends AbstractServiceCollector
Generic code for aServiceCollectorwhich is expected to run on both OpenNMS and Minion. This class takes care of performing the necessary marshaling and unmarshaling of parameters with the help of a type map provided by the implementation.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description AbstractRemoteServiceCollector()AbstractRemoteServiceCollector(Map<String,Class<?>> parameterTypeMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEffectiveLocation(String location)Allows the collector to override the location at which it should be run.Map<String,String>marshalParameters(Map<String,Object> parameters)Marshal the parameter values to strings, which is necessary for passing the parameters over the wire for the RPC call.Map<String,Object>unmarshalParameters(Map<String,String> parameters)Unmarshal the parameter values from strings.-
Methods inherited from class org.opennms.netmgt.collection.api.AbstractServiceCollector
getRuntimeAttributes, initialize, validateAgent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.collection.api.ServiceCollector
collect, getRrdRepository
-
-
-
-
Method Detail
-
getEffectiveLocation
public String getEffectiveLocation(String location)
Description copied from interface:ServiceCollectorAllows the collector to override the location at which it should be run. This call will always be performed in OpenNMS.- Specified by:
getEffectiveLocationin interfaceServiceCollector- Overrides:
getEffectiveLocationin classAbstractServiceCollector- Parameters:
location- location associated with the service to be monitored- Returns:
- a possibly updated location
-
marshalParameters
public Map<String,String> marshalParameters(Map<String,Object> parameters)
Description copied from interface:ServiceCollectorMarshal the parameter values to strings, which is necessary for passing the parameters over the wire for the RPC call. We delegate this task to theServiceCollectorinstead of handling it elsewhere since the API, and RPC module do not have access to the model objects used by the collector. This will only be called in OpenNMS when the collector is to be executed remotely.- Specified by:
marshalParametersin interfaceServiceCollector- Overrides:
marshalParametersin classAbstractServiceCollector- Returns:
-
unmarshalParameters
public Map<String,Object> unmarshalParameters(Map<String,String> parameters)
Description copied from interface:ServiceCollectorUnmarshal the parameter values from strings. This call will always be performed in Minion.- Specified by:
unmarshalParametersin interfaceServiceCollector- Overrides:
unmarshalParametersin classAbstractServiceCollector- Returns:
-
-