public class HttpUrlChecker extends Object implements ParameterChecker, Configurable
Modifier and Type | Field and Description |
---|---|
protected String |
_additionnalURL
Something to add to the parameter
|
protected Map<String,String> |
_headerValues
The values the header must have
|
protected String |
_method
The method
|
protected String |
_okCodes
The acceptable response codes
|
protected int |
_timeout
The timeout
|
protected String |
_userAgent
The user agent
|
Constructor and Description |
---|
HttpUrlChecker() |
Modifier and Type | Method and Description |
---|---|
private HttpURLConnection |
_prepareConnection(String configUrl) |
private void |
_testHeaders(HttpURLConnection httpUrlConnection) |
private void |
_testResponseCode(HttpURLConnection httpUrlConnection,
int responseCode) |
void |
check(List<String> values)
Checks the validity of the parameters.
|
void |
configure(Configuration configuration) |
protected String _userAgent
protected int _timeout
protected Map<String,String> _headerValues
protected String _additionnalURL
public HttpUrlChecker()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void check(List<String> values) throws ParameterCheckerTestFailureException
ParameterChecker
check
in interface ParameterChecker
values
- the values to testParameterCheckerTestFailureException
- if the test failedprivate HttpURLConnection _prepareConnection(String configUrl) throws IOException, MalformedURLException, ProtocolException
private void _testHeaders(HttpURLConnection httpUrlConnection) throws ParameterCheckerTestFailureException
private void _testResponseCode(HttpURLConnection httpUrlConnection, int responseCode) throws ParameterCheckerTestFailureException, IOException