public class HttpUrlChecker extends Object implements ItemChecker, Configurable
Modifier and Type | Field and Description |
---|---|
protected String |
_additionnalURL
Something to add to the parameter
|
protected String |
_method
The method
|
protected String |
_okCodes
The acceptable response codes
|
protected Map<String,String> |
_requestHeaderValues
The values the header must have
|
protected Map<String,String> |
_responseHeaderValues
The values the header must have
|
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> _requestHeaderValues
protected Map<String,String> _responseHeaderValues
protected String _additionnalURL
public HttpUrlChecker()
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void check(List<String> values) throws ItemCheckerTestFailureException
ItemChecker
check
in interface ItemChecker
values
- the values to testItemCheckerTestFailureException
- if the test failedprivate HttpURLConnection _prepareConnection(String configUrl) throws IOException, MalformedURLException, ProtocolException
private void _testHeaders(HttpURLConnection httpUrlConnection) throws ItemCheckerTestFailureException
ItemCheckerTestFailureException
private void _testResponseCode(HttpURLConnection httpUrlConnection, int responseCode) throws ItemCheckerTestFailureException, IOException