Class HttpUtils
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.internal.util.HttpUtils
-
- All Implemented Interfaces:
Loggable
public class HttpUtils extends LoggedObject
Set of common HTTP(S) utility methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpUtils.HttpResult
Storage class for the HTTP ping result.
-
Constructor Summary
Constructors Constructor Description HttpUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
ping(URL pingURL)
boolean
ping(URL pingURL, Map<String,String> requestProperties, HttpUtils.HttpResult result)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.boolean
ping(URL pingURL, Map<String,String> requestProperties, HttpUtils.HttpResult result, long timeout)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.boolean
ping(URL pingURL, HttpUtils.HttpResult result)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.boolean
ping(URL pingURL, HttpUtils.HttpResult result, long timeout)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Method Detail
-
ping
public boolean ping(URL pingURL)
- Parameters:
pingURL
- the URL to ping- Returns:
- true if the URL can be ping or false otherwise
-
ping
public boolean ping(URL pingURL, HttpUtils.HttpResult result)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.- Parameters:
pingURL
- the URL to pingresult
- the detailed ping result- Returns:
- true if the URL can be ping or false otherwise
-
ping
public boolean ping(URL pingURL, HttpUtils.HttpResult result, long timeout)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.- Parameters:
pingURL
- the URL to pingresult
- the detailed ping resulttimeout
- the timeout to wait for, 0 if waiting to infinity- Returns:
- true if the URL can be ping or false otherwise
-
ping
public boolean ping(URL pingURL, Map<String,String> requestProperties, HttpUtils.HttpResult result)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.- Parameters:
pingURL
- the URL to pingrequestProperties
- optional request properties to add to the connection (can be null)result
- the detailed ping result- Returns:
- true if the URL can be ping or false otherwise
-
ping
public boolean ping(URL pingURL, Map<String,String> requestProperties, HttpUtils.HttpResult result, long timeout)
Ping a URL and store the detailed result in aHttpUtils.HttpResult
object.- Parameters:
pingURL
- the URL to pingrequestProperties
- optional request properties to add to the connection (can be null)result
- the detailed ping resulttimeout
- the timeout to wait for, 0 if waiting to infinity- Returns:
- true if the URL can be ping or false otherwise
-
-