Class WsManDetectorFactory
- java.lang.Object
-
- org.opennms.netmgt.provision.support.GenericServiceDetectorFactory<WsManDetector>
-
- org.opennms.netmgt.provision.detector.wsman.WsManDetectorFactory
-
- All Implemented Interfaces:
ServiceDetectorFactory<WsManDetector>
@Component public class WsManDetectorFactory extends GenericServiceDetectorFactory<WsManDetector>
-
-
Constructor Summary
Constructors Constructor Description WsManDetectorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterDetect(DetectRequest request, DetectResults results, java.lang.Integer nodeId)
Stores the product vendor and product version in the node assets table after the service was successfully detected.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.WsManDetector
createDetector(java.util.Map<java.lang.String,java.lang.String> properties)
Instantiates a new detector and set bean properties.-
Methods inherited from class org.opennms.netmgt.provision.support.GenericServiceDetectorFactory
getDetectorClass, setBeanProperties
-
-
-
-
Method Detail
-
createDetector
public WsManDetector 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<WsManDetector>
- Overrides:
createDetector
in classGenericServiceDetectorFactory<WsManDetector>
- 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<WsManDetector>
- Overrides:
buildRequest
in classGenericServiceDetectorFactory<WsManDetector>
- 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
-
afterDetect
@Transactional public void afterDetect(DetectRequest request, DetectResults results, java.lang.Integer nodeId)
Stores the product vendor and product version in the node assets table after the service was successfully detected.- Specified by:
afterDetect
in interfaceServiceDetectorFactory<WsManDetector>
- Overrides:
afterDetect
in classGenericServiceDetectorFactory<WsManDetector>
- Parameters:
request
-DetectRequest
results
-DetectResults
nodeId
-OnmsNode.getNodeId()
-
-