org.apache.maven.doxia.linkcheck
Class HttpBean

java.lang.Object
  extended by org.apache.maven.doxia.linkcheck.HttpBean
All Implemented Interfaces:
Serializable

public class HttpBean
extends Object
implements Serializable

Http bean to encapsulate the supported HTTP parameters.

Version:
$Revision$ $Date$
See Also:
org.apache.commons.httpclient.HttpMethod., Serialized Form

Constructor Summary
HttpBean()
           
 
Method Summary
 boolean equals(Object other)
          Method equals.
 Properties getHttpClientParameters()
           
 String getMethod()
          Get the HTTP method to use.
 String getProxyHost()
          Get the proxy host.
 String getProxyNtlmDomain()
          Get the proxy NTLM (NT Lan Manager) domain.
 String getProxyNtlmHost()
          Get the proxy NTLM (NT Lan Manager) host.
 String getProxyPassword()
          Get the proxy password.
 int getProxyPort()
          Get the proxy port.
 String getProxyUser()
          Get the proxy user.
 int getTimeout()
          Get the timeout to be used.
 int hashCode()
          Method hashCode.
 boolean isFollowRedirects()
          Get if the HTTP method should automatically follow HTTP redirects (status code 302, etc.), false otherwise.
 void setFollowRedirects(boolean followRedirects)
          Set if the HTTP method should automatically follow HTTP redirects (status code 302, etc.), false otherwise.
 void setHttpClientParameters(Properties httpClientParameters)
           
 void setMethod(String method)
          Set the HTTP method to use.
 void setProxyHost(String proxyHost)
          Set the proxy host.
 void setProxyNtlmDomain(String proxyNtlmDomain)
          Set the proxy NTLM (NT Lan Manager) domain.
 void setProxyNtlmHost(String proxyNtlmHost)
          Set the proxy NTLM (NT Lan Manager) host.
 void setProxyPassword(String proxyPassword)
          Set the proxy password.
 void setProxyPort(int proxyPort)
          Set the proxy port.
 void setProxyUser(String proxyUser)
          Set the proxy user.
 void setTimeout(int timeout)
          Set the timeout to be used.
 String toString()
          Method toString.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpBean

public HttpBean()
Method Detail

equals

public boolean equals(Object other)
Method equals.

Overrides:
equals in class Object
Parameters:
other -
Returns:
boolean

getMethod

public String getMethod()
Get the HTTP method to use. Currently supported are "GET" and "HEAD".
HTTP GET
The HTTP GET method is defined in section 9.3 of RFC2616:
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HTTP HEAD
The HTTP HEAD method is defined in section 9.4 of RFC2616:
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

Returns:
String

getProxyHost

public String getProxyHost()
Get the proxy host.

Returns:
String

getProxyNtlmDomain

public String getProxyNtlmDomain()
Get the proxy NTLM (NT Lan Manager) domain.

Returns:
String

getProxyNtlmHost

public String getProxyNtlmHost()
Get the proxy NTLM (NT Lan Manager) host.

Returns:
String

getProxyPassword

public String getProxyPassword()
Get the proxy password.

Returns:
String

getProxyPort

public int getProxyPort()
Get the proxy port.

Returns:
int

getProxyUser

public String getProxyUser()
Get the proxy user.

Returns:
String

getTimeout

public int getTimeout()
Get the timeout to be used. A value of zero means the timeout is not used. Default value is 2000.

Returns:
int

hashCode

public int hashCode()
Method hashCode.

Overrides:
hashCode in class Object
Returns:
int

isFollowRedirects

public boolean isFollowRedirects()
Get if the HTTP method should automatically follow HTTP redirects (status code 302, etc.), false otherwise.

Returns:
boolean

setFollowRedirects

public void setFollowRedirects(boolean followRedirects)
Set if the HTTP method should automatically follow HTTP redirects (status code 302, etc.), false otherwise.

Parameters:
followRedirects -

setMethod

public void setMethod(String method)
Set the HTTP method to use. Currently supported are "GET" and "HEAD".
HTTP GET
The HTTP GET method is defined in section 9.3 of RFC2616:
The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI.
HTTP HEAD
The HTTP HEAD method is defined in section 9.4 of RFC2616:
The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.

Parameters:
method -

setProxyHost

public void setProxyHost(String proxyHost)
Set the proxy host.

Parameters:
proxyHost -

setProxyNtlmDomain

public void setProxyNtlmDomain(String proxyNtlmDomain)
Set the proxy NTLM (NT Lan Manager) domain.

Parameters:
proxyNtlmDomain -

setProxyNtlmHost

public void setProxyNtlmHost(String proxyNtlmHost)
Set the proxy NTLM (NT Lan Manager) host.

Parameters:
proxyNtlmHost -

setProxyPassword

public void setProxyPassword(String proxyPassword)
Set the proxy password.

Parameters:
proxyPassword -

setProxyPort

public void setProxyPort(int proxyPort)
Set the proxy port.

Parameters:
proxyPort -

setProxyUser

public void setProxyUser(String proxyUser)
Set the proxy user.

Parameters:
proxyUser -

toString

public String toString()
Method toString.

Overrides:
toString in class Object
Returns:
String

setTimeout

public void setTimeout(int timeout)
Set the timeout to be used. A value of zero means the timeout is not used.

Parameters:
timeout - positive int

getHttpClientParameters

public Properties getHttpClientParameters()
Returns:
the extra HttpClient parameters
See Also:
http://hc.apache.org/httpclient-3.x/preference-api.html

setHttpClientParameters

public void setHttpClientParameters(Properties httpClientParameters)
Parameters:
httpClientParameters - the extra HttpClient parameters to set
See Also:
http://hc.apache.org/httpclient-3.x/preference-api.html


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.