Class GenericSnmpDetectorFactory<T extends SnmpDetector>

    • Constructor Detail

      • GenericSnmpDetectorFactory

        public GenericSnmpDetectorFactory​(java.lang.Class<T> clazz)
    • Method Detail

      • createDetector

        public T 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);
         
         
        Detectors are treated as protoypes and should only be used for a single call to "isServiceDetected".
        Specified by:
        createDetector in interface ServiceDetectorFactory<T extends SnmpDetector>
        Overrides:
        createDetector in class GenericServiceDetectorFactory<SnmpDetector>
        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 interface ServiceDetectorFactory<T extends SnmpDetector>
        Overrides:
        buildRequest in class GenericServiceDetectorFactory<SnmpDetector>
        Parameters:
        location - name of the location in which the detector will be invoked
        address - address of the agent against which the detector will be invoked
        port - port of the agent against which the detector will be invoked
        Returns:
        a new DetectRequest
      • getRuntimeAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getRuntimeAttributes​(java.lang.String location,
                                                                                           java.net.InetAddress address)