On 05/01/2014 09:19 PM, Bobby Krupczak wrote:

> - If I understand it correctly, the basic interface of a detector is
>   simply given an InetAddress and is asked "does that system have the
>   protocol/service on it?"  I'm free to figure it out however I would
>   like and I return true/false.  Is this a correct understanding?

Yes it is. The logic is up to you -- the LoopDetector, for example, does
not even perform any network operations in making its decision.

> - Is there one instance of an XmpDetector created for the entire
>   running ONMS instance (like collectors) or are there many instances
>   of XmpDetectors ?

They're beans, and not singletons. Your detector class may (and probably
should) have member variables, with getters and setters. The web UI for
configuring detectors uses reflection to show the user a list of
parameters that are appropriate for a given detector class.

> - If the interface is that simple, do I need to bother to try to
>   inherit from BasicDetector or SyncDetector?

Seems that this could go either way. I'm not familiar enough with the
various abstract classes to steer you confidently in a particular
direction, but my gut says BasicDetector might be a good choice.

> - My protocol is synchronous; do I need to somehow declare that or let
>   the creater of my detector know this?

Not sure on that one either.

> - How do I glue my newly created XmpDetector back into the ONMS hive
>   so that its invoked automatically?  I'm guessing some sort of
>   etc/xml file?

There's some semi-magical Spring wiring that needs to be included in the
JAR. Relative to your subproject's root, this should live at
src/main/resources/META-INF/opennms/detectors.xml. A good example to
crib from might be the one for protocols/nsclient.

-jeff

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to