|
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.AbstractTcpPlugin
org.opennms.netmgt.capsd.HttpPlugin
This class is designed to be used by the capabilities daemon to test for the existance of an HTTP server on remote interfaces. The class implements the Plugin interface that allows it to be used along with other plugins by the daemon. This plugin generates a HTTP GET request and checks the return code returned by the remote host to determine if it supports the protocol. The remote host's response will be deemed valid if the return code falls in the 100 to 599 range (inclusive). This is based on the following information from RFC 1945 (HTTP 1.0) HTTP 1.0 GET return codes: 1xx: Informational - Not used, future use 2xx: Success 3xx: Redirection 4xx: Client error 5xx: Server error
This plugin generates a HTTP GET request and checks the return code returned by the remote host to determine if it supports the protocol. The remote host's response will be deemed valid if the return code falls in the 100 to 599 range (inclusive). This is based on the following information from RFC 1945 (HTTP 1.0) HTTP 1.0 GET return codes: 1xx: Informational - Not used, future use 2xx: Success 3xx: Redirection 4xx: Client error 5xx: Server error This plugin generates a HTTP GET request and checks the return code returned by the remote host to determine if it supports the protocol. The remote host's response will be deemed valid if the return code falls in the 100 to 599 range (inclusive). This is based on the following information from RFC 1945 (HTTP 1.0) HTTP 1.0 GET return codes: 1xx: Informational - Not used, future use 2xx: Success 3xx: Redirection 4xx: Client error 5xx: Server error
Field Summary | |
static boolean |
CHECK_RETURN_CODE
Boolean indicating whether to check for a return code |
private static int[] |
DEFAULT_PORTS
The default ports on which the host is checked to see if it supports HTTP. |
private static int |
DEFAULT_RETRY
Default number of retries for HTTP requests. |
private static int |
DEFAULT_TIMEOUT
Default timeout (in milliseconds) for HTTP requests. |
private boolean |
m_checkReturnCode
Boolean indicating whether to check for a return code |
private int[] |
m_defaultPorts
The default ports to check on a server |
private java.lang.String |
m_queryString
The query to send to the HTTP server |
private java.lang.String |
m_responseString
A string to look for in the response from the server |
static java.lang.String |
PROTOCOL_NAME
|
static java.lang.String |
QUERY_STRING
The query to send to the HTTP server |
static java.lang.String |
RESPONSE_STRING
A string to look for in the response from the server |
Fields inherited from class org.opennms.netmgt.capsd.AbstractTcpPlugin |
m_defaultPort, m_defaultRetry, m_defaultTimeout, m_pluginName, m_protocolName |
Constructor Summary | |
|
HttpPlugin()
|
protected |
HttpPlugin(java.lang.String protocolName,
boolean checkReturnCode,
java.lang.String queryString,
java.lang.String responseString)
|
protected |
HttpPlugin(java.lang.String protocolName,
boolean checkReturnCode,
java.lang.String queryString,
java.lang.String responseString,
int[] defaultPorts)
|
Method Summary | |
protected boolean |
checkProtocol(java.net.Socket socket,
ConnectionConfig config)
|
protected java.util.List |
getConnectionConfigList(java.util.Map qualifiers,
java.net.InetAddress address)
|
Methods inherited from class org.opennms.netmgt.capsd.AbstractTcpPlugin |
checkConnection, closeSocket, createConnectionConfig, getKeyedInteger, getKeyedIntegerArray, getPluginName, getProtocolName, isProtocolSupported, isProtocolSupported, populateConnectionConfig, preconnectCheck, saveConfig, saveKeyedInteger, setPluginName, wrapSocket |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean CHECK_RETURN_CODE
private static final int[] DEFAULT_PORTS
The default ports on which the host is checked to see if it supports HTTP.
private static final int DEFAULT_RETRY
private static final int DEFAULT_TIMEOUT
public static final java.lang.String PROTOCOL_NAME
public static final java.lang.String QUERY_STRING
public static final java.lang.String RESPONSE_STRING
private boolean m_checkReturnCode
private int[] m_defaultPorts
private java.lang.String m_queryString
private java.lang.String m_responseString
Constructor Detail |
public HttpPlugin()
protected HttpPlugin(java.lang.String protocolName, boolean checkReturnCode, java.lang.String queryString, java.lang.String responseString)
protected HttpPlugin(java.lang.String protocolName, boolean checkReturnCode, java.lang.String queryString, java.lang.String responseString, int[] defaultPorts)
Method Detail |
protected boolean checkProtocol(java.net.Socket socket, ConnectionConfig config) throws java.io.IOException
checkProtocol
in class AbstractTcpPlugin
java.io.IOException
protected java.util.List getConnectionConfigList(java.util.Map qualifiers, java.net.InetAddress address)
getConnectionConfigList
in class AbstractTcpPlugin
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |