org.codehaus.cargo.container.internal.util
Class HttpUtils

java.lang.Object
  extended byorg.codehaus.cargo.util.log.LoggedObject
      extended byorg.codehaus.cargo.container.internal.util.HttpUtils
All Implemented Interfaces:
org.codehaus.cargo.util.log.Loggable

public class HttpUtils
extends org.codehaus.cargo.util.log.LoggedObject

Set of common HTTP(S) utility methods.

Version:
$Id: HttpUtils.java 987 2006-04-04 07:50:16Z vmassol $

Nested Class Summary
static class HttpUtils.HttpResult
          Storage class for the HTTP ping result.
 
Constructor Summary
HttpUtils()
           
 
Method Summary
 boolean ping(java.net.URL pingURL)
           
 boolean ping(java.net.URL pingURL, HttpUtils.HttpResult result)
          Ping a URL and store the detailed result in a HttpUtils.HttpResult object.
 boolean ping(java.net.URL pingURL, java.util.Map requestProperties, HttpUtils.HttpResult result)
          Ping a URL and store the detailed result in a HttpUtils.HttpResult object.
 
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpUtils

public HttpUtils()
Method Detail

ping

public final boolean ping(java.net.URL pingURL)
Parameters:
pingURL - the URL to ping
Returns:
true if the URL can be ping or false otherwise

ping

public final boolean ping(java.net.URL pingURL,
                          HttpUtils.HttpResult result)
Ping a URL and store the detailed result in a HttpUtils.HttpResult object.

Parameters:
pingURL - the URL to ping
result - the detailed ping result
Returns:
true if the URL can be ping or false otherwise

ping

public final boolean ping(java.net.URL pingURL,
                          java.util.Map requestProperties,
                          HttpUtils.HttpResult result)
Ping a URL and store the detailed result in a HttpUtils.HttpResult object.

Parameters:
pingURL - the URL to ping
requestProperties - 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


Copyright © 2004-2007 Codehaus. All Rights Reserved.