Class ParameterSubstitutingMonitor
- java.lang.Object
-
- org.opennms.netmgt.poller.support.AbstractServiceMonitor
-
- org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor
-
- All Implemented Interfaces:
ServiceMonitor
- Direct Known Subclasses:
DNSResolutionMonitor
,FtpMonitor
,HttpMonitor
,HttpPostMonitor
,JCifsMonitor
,JDBCMonitor
,JolokiaBeanMonitor
,LdapMonitor
,RadiusAuthMonitor
,SSLCertMonitor
,WsManMonitor
public abstract class ParameterSubstitutingMonitor extends AbstractServiceMonitor
Usesorg.opennms.netmgt.poller.ServiceMonitor#getRuntimeAttributes(MonitoredService svc, Map
to add parameters with substitutions of placeholders in existing parameters. The new parameter keys will be prepended withparameters) 'subbed-'
.- Author:
- David Schlenk
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description ParameterSubstitutingMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getRuntimeAttributes(MonitoredService svc, Map<String,Object> parameters)
Add new parameters derived from existing parameters that contain placeholders.static Map<String,Object>
getSubstitutedParameters(MonitoredService svc, Map<String,Object> parameters)
protected static String
parseString(String unformattedString, Matcher m, MonitoredService svc)
protected static String
resolveKeyedString(Map<String,Object> parameterMap, String key, String defaultValue)
-
Methods inherited from class org.opennms.netmgt.poller.support.AbstractServiceMonitor
getEffectiveLocation, getKeyedBoolean, getKeyedInstance, getKeyedInteger, getKeyedLong, getKeyedObject, getKeyedString, getServiceProperties
-
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.poller.ServiceMonitor
poll
-
-
-
-
Method Detail
-
getRuntimeAttributes
public Map<String,Object> getRuntimeAttributes(MonitoredService svc, Map<String,Object> parameters)
Add new parameters derived from existing parameters that contain placeholders. The new key will be prepended with 'subbed-'.- Specified by:
getRuntimeAttributes
in interfaceServiceMonitor
- Overrides:
getRuntimeAttributes
in classAbstractServiceMonitor
- Parameters:
svc
- Includes details about to the service being monitored.parameters
- Includes the service parameters defined in poller-configuration.xml and those returned byServiceMonitor.getRuntimeAttributes(MonitoredService, Map)
.- Returns:
- Additional attributes, which should be added to the parameter map before calling
ServiceMonitor.poll(MonitoredService, Map)
.
-
getSubstitutedParameters
public static Map<String,Object> getSubstitutedParameters(MonitoredService svc, Map<String,Object> parameters)
-
parseString
protected static String parseString(String unformattedString, Matcher m, MonitoredService svc)
-
-