@Component public class WsManDetectorFactory extends GenericServiceDetectorFactory<WsManDetector>
Constructor and Description |
---|
WsManDetectorFactory() |
Modifier and Type | Method and Description |
---|---|
void |
afterDetect(DetectRequest request,
DetectResults results,
Integer nodeId)
Stores the product vendor and product version in the node assets table
after the service was successfully detected.
|
DetectRequest |
buildRequest(String location,
InetAddress address,
Integer port,
Map<String,String> attributes)
Builds the request that will be used to invoke the detector.
|
WsManDetector |
createDetector(Map<String,String> properties)
Instantiates a new detector and set bean properties.
|
getDetectorClass, setBeanProperties
public WsManDetector 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<WsManDetector>
createDetector
in class GenericServiceDetectorFactory<WsManDetector>
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<WsManDetector>
buildRequest
in class GenericServiceDetectorFactory<WsManDetector>
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
@Transactional public void afterDetect(DetectRequest request, DetectResults results, Integer nodeId)
afterDetect
in interface ServiceDetectorFactory<WsManDetector>
afterDetect
in class GenericServiceDetectorFactory<WsManDetector>
request
- DetectRequest
results
- DetectResults
nodeId
- OnmsNode.getNodeId()
Copyright © 2020. All rights reserved.