Class GenericJMXDetectorFactory<T extends JMXDetector>
- java.lang.Object
-
- org.opennms.netmgt.provision.support.GenericServiceDetectorFactory<JMXDetector>
-
- org.opennms.netmgt.provision.detector.jmx.GenericJMXDetectorFactory<T>
-
- All Implemented Interfaces:
ServiceDetectorFactory<JMXDetector>
- Direct Known Subclasses:
Jsr160DetectorFactory
public class GenericJMXDetectorFactory<T extends JMXDetector> extends GenericServiceDetectorFactory<JMXDetector>
-
-
Field Summary
Fields Modifier and Type Field Description protected JmxConfigDao
jmxConfigDao
-
Constructor Summary
Constructors Constructor Description GenericJMXDetectorFactory(java.lang.Class<T> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DetectRequest
buildRequest(java.lang.String location, java.net.InetAddress address, java.lang.Integer port, java.util.Map<java.lang.String,java.lang.String> attributes)
Builds the request that will be used to invoke the detector.T
createDetector(java.util.Map<java.lang.String,java.lang.String> properties)
Instantiates a new detector and set bean properties.void
setJmxConfigDao(JmxConfigDao jmxConfigDao)
-
Methods inherited from class org.opennms.netmgt.provision.support.GenericServiceDetectorFactory
afterDetect, getDetectorClass, setBeanProperties
-
-
-
-
Field Detail
-
jmxConfigDao
@Autowired(required=false) protected JmxConfigDao jmxConfigDao
-
-
Constructor Detail
-
GenericJMXDetectorFactory
public GenericJMXDetectorFactory(java.lang.Class<T> clazz)
-
-
Method Detail
-
createDetector
public T createDetector(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:ServiceDetectorFactory
Instantiates a new detector and set bean properties. One of the ways to set bean properties is using Spring @BeanWrapper
BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(serviceDetector); wrapper.setPropertyValues(properties);
- Specified by:
createDetector
in interfaceServiceDetectorFactory<T extends JMXDetector>
- Overrides:
createDetector
in classGenericServiceDetectorFactory<JMXDetector>
- Parameters:
properties
- are used to set properties on detector bean.
-
buildRequest
public DetectRequest buildRequest(java.lang.String location, java.net.InetAddress address, java.lang.Integer port, java.util.Map<java.lang.String,java.lang.String> attributes)
Description copied from interface:ServiceDetectorFactory
Builds the request that will be used to invoke the detector.- Specified by:
buildRequest
in interfaceServiceDetectorFactory<T extends JMXDetector>
- Overrides:
buildRequest
in classGenericServiceDetectorFactory<JMXDetector>
- Parameters:
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 invoked- Returns:
- a new
DetectRequest
-
setJmxConfigDao
public void setJmxConfigDao(JmxConfigDao jmxConfigDao)
-
-