|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.capsd.AbstractPlugin
org.opennms.netmgt.capsd.DhcpPlugin
This class is designed to be used by the capabilities daemon to test if a remote interface is running a functional DHCP server as defined by RFC 2131. This class relies on the DHCP API provided by JDHCP v1.1.1. (please refer to http://www.dhcp.org/javadhcp). The class implements the Plugin interface that allows it to be used along with other plugins by the daemon.
Field Summary | |
private static int |
DEFAULT_RETRY
Default number of retries for DHCP requests |
private static int |
DEFAULT_TIMEOUT
Default timeout (in milliseconds) for DHCP requests |
private static java.lang.Integer |
PORT_NUMBER
The port where the DHCP server is detected. |
private static java.lang.String |
PROTOCOL_NAME
The protocol name of the plugin. |
Constructor Summary | |
DhcpPlugin()
|
Method Summary | |
java.lang.String |
getProtocolName()
This method returns the name of the protocol supported by this plugin. |
boolean |
isProtocolSupported(java.net.InetAddress host)
This method is used to test the passed host for DHCP server support. |
boolean |
isProtocolSupported(java.net.InetAddress host,
java.util.Map qualifiers)
This method is used to test the passed host for DHCP server support. |
private boolean |
isServer(java.net.InetAddress host,
int retries,
int timeout)
This method is used to test a passed address for DHCP server support. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.Integer PORT_NUMBER
private static final java.lang.String PROTOCOL_NAME
The protocol name of the plugin.
private static final int DEFAULT_RETRY
private static final int DEFAULT_TIMEOUT
Constructor Detail |
public DhcpPlugin()
Method Detail |
private boolean isServer(java.net.InetAddress host, int retries, int timeout)
host
- The host address to checkretries
- The maximum number of attempts to try.timeout
- The time to wait for a response to each request.
public java.lang.String getProtocolName()
getProtocolName
in interface Plugin
getProtocolName
in class AbstractPlugin
public boolean isProtocolSupported(java.net.InetAddress host)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
host
- The remote host to test.
public boolean isProtocolSupported(java.net.InetAddress host, java.util.Map qualifiers)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
host
- The remote host to test.qualifiers
- The location where qualifier parameters are read and written.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |