T - detector typepublic interface ServiceDetectorFactory<T extends ServiceDetector>
| Modifier and Type | Method and Description |
|---|---|
void |
afterDetect(DetectRequest request,
DetectResults results,
Integer nodeId)
Optional implementation.
|
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.
|
Class<T> |
getDetectorClass()
Used by the detector registry to track and index the detector types.
|
Class<T> getDetectorClass()
T createDetector(Map<String,String> properties)
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".properties - are used to set properties on detector bean.DetectRequest buildRequest(String location, InetAddress address, Integer port, Map<String,String> attributes)
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 invokedDetectRequestvoid afterDetect(DetectRequest request, DetectResults results, Integer nodeId)
request - DetectRequestresults - DetectResultsnodeId - OnmsNode.getNodeId()Copyright © 2022. All rights reserved.