|
|||||||||
| 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.plugins.HttpPlugin
public class 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 |
static java.lang.String |
DEFAULT_URL
The query to send to the HTTP 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 |
| 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
public static final java.lang.String PROTOCOL_NAME
public static final java.lang.String QUERY_STRING
public static final java.lang.String DEFAULT_URL
public static final java.lang.String RESPONSE_STRING
| Constructor Detail |
|---|
public HttpPlugin()
protocol - defaultPort - defaultTimeout - defaultRetries -
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 AbstractTcpPluginsChannel - isAServer -
java.io.IOException
protected java.util.List getConnectionConfigList(java.util.Map qualifiers,
java.net.InetAddress address)
getConnectionConfigList in class AbstractTcpPlugin
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||