public class GenericSnmpDetectorFactory<T extends SnmpDetector> extends GenericServiceDetectorFactory<SnmpDetector>
Constructor and Description |
---|
GenericSnmpDetectorFactory(Class<T> clazz) |
Modifier and Type | Method and Description |
---|---|
DetectRequest |
buildRequest(String location,
InetAddress address,
Integer port,
Map<String,String> attributes)
Builds the request that will be used to invoke the detector.
|
T |
createDetector(Map<String,String> properties)
Instantiates a new detector and set bean properties.
|
SnmpAgentConfigFactory |
getAgentConfigFactory() |
Map<String,String> |
getRuntimeAttributes(String location,
InetAddress address) |
void |
setAgentConfigFactory(SnmpAgentConfigFactory agentConfigFactory) |
afterDetect, getDetectorClass, setBeanProperties
public T createDetector(Map<String,String> properties)
ServiceDetectorFactory
BeanWrapper
BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(serviceDetector);
wrapper.setPropertyValues(properties);
Detectors are treated as protoypes and should only be used for a
single call to "isServiceDetected".createDetector
in interface ServiceDetectorFactory<SnmpDetector>
createDetector
in class GenericServiceDetectorFactory<SnmpDetector>
properties
- are used to set properties on detector bean.public DetectRequest buildRequest(String location, InetAddress address, Integer port, Map<String,String> attributes)
ServiceDetectorFactory
buildRequest
in interface ServiceDetectorFactory<SnmpDetector>
buildRequest
in class GenericServiceDetectorFactory<SnmpDetector>
location
- name of the location in which the detector will be invokedaddress
- address of the agent against which the detector will be invokedport
- port of the agent against which the detector will be invokedDetectRequest
public Map<String,String> getRuntimeAttributes(String location, InetAddress address)
public void setAgentConfigFactory(SnmpAgentConfigFactory agentConfigFactory)
public SnmpAgentConfigFactory getAgentConfigFactory()
Copyright © 2020. All rights reserved.