public class GenericJMXDetectorFactory<T extends JMXDetector> extends GenericServiceDetectorFactory<JMXDetector>
Modifier and Type | Field and Description |
---|---|
protected JmxConfigDao |
jmxConfigDao |
Constructor and Description |
---|
GenericJMXDetectorFactory(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.
|
void |
setJmxConfigDao(JmxConfigDao jmxConfigDao) |
afterDetect, getDetectorClass, setBeanProperties
@Autowired(required=false) protected JmxConfigDao jmxConfigDao
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<JMXDetector>
createDetector
in class GenericServiceDetectorFactory<JMXDetector>
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<JMXDetector>
buildRequest
in class GenericServiceDetectorFactory<JMXDetector>
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 void setJmxConfigDao(JmxConfigDao jmxConfigDao)
Copyright © 2020. All rights reserved.