|
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.DnsPlugin
This plugin is used to check a host for DNS (Domain Name Server) support. This is done by contacting the specified host and requesting the default address or localhost. If a valid resposne is returned then the server is considered a DNS server.
Field Summary | |
private static java.lang.String |
DEFAULT_LOOKUP
Default DNS lookup |
private static int |
DEFAULT_PORT
The default port on which the host is checked to see if it supports DNS. |
private static int |
DEFAULT_RETRY
Default number of retries for DNS requests |
private static int |
DEFAULT_TIMEOUT
Default timeout (in milliseconds) for DNS requests. |
private static java.lang.String |
PROTOCOL_NAME
The protocol name that is tested by this plugin. |
Constructor Summary | |
DnsPlugin()
|
Method Summary | |
java.lang.String |
getProtocolName()
Returns the name of the protocol that this plugin checks on the target system for support. |
boolean |
isProtocolSupported(java.net.InetAddress address)
Returns true if the protocol defined by this plugin is supported. |
boolean |
isProtocolSupported(java.net.InetAddress address,
java.util.Map qualifiers)
Returns true if the protocol defined by this plugin is supported. |
private boolean |
isServer(java.net.InetAddress nserver,
int port,
int retries,
int timeout,
java.lang.String lookup)
|
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.String PROTOCOL_NAME
private static final int DEFAULT_PORT
private static final int DEFAULT_RETRY
private static final int DEFAULT_TIMEOUT
private static final java.lang.String DEFAULT_LOOKUP
Constructor Detail |
public DnsPlugin()
Method Detail |
private boolean isServer(java.net.InetAddress nserver, int port, int retries, int timeout, java.lang.String lookup)
nserver
- The address for the name server test.port
- The port to test for name resolutiontimeout
- Timeout in millisecondslookup
- Host name to be used in DNS lookup packet
public java.lang.String getProtocolName()
getProtocolName
in interface Plugin
getProtocolName
in class AbstractPlugin
public boolean isProtocolSupported(java.net.InetAddress address)
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- The address to check for support.
public boolean isProtocolSupported(java.net.InetAddress address, java.util.Map 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.
In addition, the input qualifiers map also provides information about how the plugin should contact the remote server. The plugin may check the qualifier map for specific elements and then adjust its behavior as necessary
isProtocolSupported
in interface Plugin
isProtocolSupported
in class AbstractPlugin
address
- The address to check for support.qualifiers
- The map where qualification are set by the plugin.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |