Package org.opennms.netmgt.provision
Interface ServiceDetectorFactory<T extends ServiceDetector>
-
- Type Parameters:
T- detector type
- All Known Implementing Classes:
ActiveMQDetectorFactory,BgpSessionDetectorFactory,BSFDetectorFactory,CiscoIpSlaDetectorFactory,CitrixDetectorFactory,DhcpDetectorFactory,DiskUsageDetectorFactory,DnsDetectorFactory,DominoIIOPDetectorFactory,FtpDetectorFactory,GenericJMXDetectorFactory,GenericServiceDetectorFactory,GenericSnmpDetectorFactory,GpDetectorFactory,HostResourceSWRunDetectorFactory,HttpDetectorFactory,HttpsDetectorFactory,IcmpDetectorFactory,ImapDetectorFactory,ImapsDetectorFactory,JdbcDetectorFactory,JdbcQueryDetectorFactory,JdbcStoredProcedureDetectorFactory,Jsr160DetectorFactory,LdapDetectorFactory,LdapsDetectorFactory,LoopDetectorFactory,MemcachedDetectorFactory,MSExchangeDetectorFactory,NotesHttpDetectorFactory,NrpeDetectorFactory,NsclientDetectorFactory,NtpDetectorFactory,OmsaStorageDetectorFactory,OpenManageChassisDetectorFactory,PercDetectorFactory,Pop3DetectorFactory,RadiusAuthDetectorFactory,RDNSLookupDetectorFactory,ServiceDetectorFactoryImpl,SmbDetectorFactory,SmtpDetectorFactory,SnmpDetectorFactory,SshDetectorFactory,TcpDetectorFactory,TrivialTimeDetectorFactory,WebDetectorFactory,Win32ServiceDetectorFactory,WmiDetectorFactory,WsManDetectorFactory,WsManWQLDetectorFactory,XmpDetectorFactory
public interface ServiceDetectorFactory<T extends ServiceDetector>Responsible for instantiating detectors, gathering state information or agent specific details, and optionally handling post-processing of the requests.- Author:
- jwhite
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterDetect(DetectRequest request, DetectResults results, Integer nodeId)Optional implementation.DetectRequestbuildRequest(String location, InetAddress address, Integer port, Map<String,String> attributes)Builds the request that will be used to invoke the detector.TcreateDetector(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.
-
-
-
Method Detail
-
getDetectorClass
Class<T> getDetectorClass()
Used by the detector registry to track and index the detector types.
-
createDetector
T createDetector(Map<String,String> properties)
Instantiates a new detector and set bean properties. One of the ways to set bean properties is using Spring @BeanWrapper
Detectors are treated as protoypes and should only be used for a single call to "isServiceDetected".BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(serviceDetector); wrapper.setPropertyValues(properties);- Parameters:
properties- are used to set properties on detector bean.
-
buildRequest
DetectRequest buildRequest(String location, InetAddress address, Integer port, Map<String,String> attributes)
Builds the request that will be used to invoke the detector.- 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
void afterDetect(DetectRequest request, DetectResults results, Integer nodeId)
Optional implementation.- Parameters:
request-DetectRequestresults-DetectResultsnodeId-OnmsNode.getNodeId()
-
-