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 void
afterDetect(DetectRequest request, DetectResults results, java.lang.Integer nodeId)
Optional implementation.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.java.lang.Class<T>
getDetectorClass()
Used by the detector registry to track and index the detector types.
-
-
-
Method Detail
-
getDetectorClass
java.lang.Class<T> getDetectorClass()
Used by the detector registry to track and index the detector types.
-
createDetector
T createDetector(java.util.Map<java.lang.String,java.lang.String> properties)
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);
- Parameters:
properties
- are used to set properties on detector bean.
-
buildRequest
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.- 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, java.lang.Integer nodeId)
Optional implementation.- Parameters:
request
-DetectRequest
results
-DetectResults
nodeId
-OnmsNode.getNodeId()
-
-