public abstract class AbstractRemoteServiceCollector extends AbstractServiceCollector
ServiceCollector
which 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.Constructor and Description |
---|
AbstractRemoteServiceCollector() |
AbstractRemoteServiceCollector(Map<String,Class<?>> parameterTypeMap) |
Modifier and Type | Method and Description |
---|---|
String |
getEffectiveLocation(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.
|
getRuntimeAttributes, initialize, validateAgent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collect, getRrdRepository
public String getEffectiveLocation(String location)
ServiceCollector
getEffectiveLocation
in interface ServiceCollector
getEffectiveLocation
in class AbstractServiceCollector
location
- location associated with the service to be monitoredpublic Map<String,String> marshalParameters(Map<String,Object> parameters)
ServiceCollector
ServiceCollector
instead 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.marshalParameters
in interface ServiceCollector
marshalParameters
in class AbstractServiceCollector
public Map<String,Object> unmarshalParameters(Map<String,String> parameters)
ServiceCollector
unmarshalParameters
in interface ServiceCollector
unmarshalParameters
in class AbstractServiceCollector
Copyright © 2021. All rights reserved.