org.opennms.netmgt.capsd.plugins
Class IcmpPlugin

java.lang.Object
  extended by org.opennms.netmgt.capsd.AbstractPlugin
      extended by org.opennms.netmgt.capsd.plugins.IcmpPlugin
All Implemented Interfaces:
Plugin

public final class IcmpPlugin
extends AbstractPlugin

This class provides Capsd with the ability to check for ICMP support on new interfaces as them are passed into the system. In order to minimize the number of sockets and threads, this class creates a daemon thread to handle all responses and a single socket for sending echo request to various hosts.

Version:
$Id: $
Author:
Weave , OpenNMS , Weave , OpenNMS

Constructor Summary
IcmpPlugin()
           
 
Method Summary
 String getProtocolName()
          Returns the name of the protocol that this plugin checks on the target system for support.
 boolean isProtocolSupported(InetAddress address)
          Returns true if the protocol defined by this plugin is supported.
 boolean isProtocolSupported(InetAddress address, Map<String,Object> qualifiers)
          Returns true if the protocol defined by this plugin is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IcmpPlugin

public IcmpPlugin()
Method Detail

getProtocolName

public String getProtocolName()
Returns the name of the protocol that this plugin checks on the target system for support.

Specified by:
getProtocolName in interface Plugin
Specified by:
getProtocolName in class AbstractPlugin
Returns:
The protocol name for this plugin.

isProtocolSupported

public boolean isProtocolSupported(InetAddress address)
Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller.

Specified by:
isProtocolSupported in interface Plugin
Specified by:
isProtocolSupported in class AbstractPlugin
Parameters:
address - The address to check for support.
Returns:
True if the protocol is supported by the address.

isProtocolSupported

public boolean isProtocolSupported(InetAddress address,
                                   Map<String,Object> qualifiers)
Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. The qualifier map passed to the method is used by the plugin to return additional information by key-name. These key-value pairs can be added to service events if needed. Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. The qualifier map passed to the method is used by the plugin to return additional information by key-name. These key-value pairs can be added to service events if needed. Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. The qualifier map passed to the method is used by the plugin to return additional information by key-name. These key-value pairs can be added to service events if needed.

Specified by:
isProtocolSupported in interface Plugin
Specified by:
isProtocolSupported in class AbstractPlugin
Parameters:
address - The address to check for support.
qualifiers - The map where qualification are set by the plugin.
Returns:
True if the protocol is supported by the address.


Copyright © 2011. All Rights Reserved.