org.apache.commons.httpclient

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Net » Apache common HttpClient » org.apache.commons.httpclient 
org.apache.commons.httpclient
Package Documentation for org.apache.commons.httpclient

Classes and interfaces supporting the client side of the HTTP protocol.

The HttpClient component supports the client-side of RFC 1945 (HTTP/1.0) and RFC 2616 (HTTP/1.1), several related specifications (RFC 2109 (Cookies), RFC 2617 (HTTP Authentication), etc.), and provides a framework by which new request types (methods) or HTTP extensions can can be easily created or supported.

The basis for the abstraction is provided by three types:

    {@link org.apache.commons.httpclient.HttpConnection}
    represents a network connection to some HTTP host.
    {@link org.apache.commons.httpclient.HttpMethod}
    represents a request to be made over some {@link org.apache.commons.httpclient.HttpConnection} and contains the server's response.
    {@link org.apache.commons.httpclient.HttpState}
    contains the HTTP attributes that may persist from request to request, such as cookies and authentication credentials.

and several simple bean-style classes:

    {@link org.apache.commons.httpclient.Cookie}
    represents HTTP cookie.
    {@link org.apache.commons.httpclient.Credentials}
    an interface representing a set of authentication credentials.
    {@link org.apache.commons.httpclient.Header}
    represents an HTTP request or response header.
    {@link org.apache.commons.httpclient.HeaderElement}
    represents a single element of a multi-part header.
    {@link org.apache.commons.httpclient.UsernamePasswordCredentials}
    a username and password pair.

{@link org.apache.commons.httpclient.HttpClient} provides a simple "user-agent" implementation that will suffice for many applications, but whose use is not required.

HttpClient also provides several utilities that may be useful when extending the framework:

    {@link org.apache.commons.httpclient.HttpMethodBase}
    an abstract base implementation of HttpMethod, which may be extended to create new method types or to support additional protocol HTTP features.
    {@link org.apache.commons.httpclient.HttpStatus}
    an enumeration of HttpStatus codes.
    {@link org.apache.commons.httpclient.ChunkedOutputStream}
    an {@link java.io.OutputStream} wrapper supporting the "chunked" transfer encoding.
    {@link org.apache.commons.httpclient.ChunkedInputStream}
    an {@link java.io.InputStream} wrapper supporting the "chunked" transfer encoding.
    {@link org.apache.commons.httpclient.util.URIUtil}
    provides utilities for encoding and decoding URI's in the %HH format.

HttpClient Configuration with Java Properties

Java properties can be set at run time with the -Dname=value command line arguments to the application that uses HttpClient. These properties can also be set programaticly by calling System.getProperties().setProperty(name, value). This is the list of properties that HttpClient recognizes:
Name Type Effect
httpclient.useragent String Sets the User-Agent string to be sent on every HTTP request.
httpclient.authentication.preemptive boolean Sends authorization credentials without requiring explicit requests from the web server
Java Source File NameTypeComment
AccessibleHttpConnectionManager.javaClass A simple connection manager that provides access to the connection used.
AutoCloseInputStream.javaClass Closes an underlying stream as soon as the end of the stream is reached, and notifies a client when it has done so.
ChunkedInputStream.javaClass

Transparently coalesces chunks of a HTTP stream that uses Transfer-Encoding chunked.

Note that this class NEVER closes the underlying stream, even when close gets called.

ChunkedOutputStream.javaClass Implements HTTP chunking support.
CircularRedirectException.javaClass
ConnectionPoolTimeoutException.javaClass A timeout while connecting waiting for an available connection from an HttpConnectionManager.
ConnectMethod.javaClass Establishes a tunneled HTTP connection via the CONNECT method.
ConnectTimeoutException.javaClass A timeout while connecting to an HTTP server or waiting for an available connection from an HttpConnectionManager.
ContentLengthInputStream.javaClass Cuts the wrapped InputStream off after a specified number of bytes.

Implementation note: Choices abound.

Cookie.javaClass

HTTP "magic-cookie" represents a piece of state information that the HTTP agent and the target server can exchange to maintain a session.


author:
   B.C.
Credentials.javaInterface

Authentication credentials.

This is just a marker interface, the current implementation has no methods.

DefaultHttpMethodRetryHandler.javaClass The default HttpMethodRetryHandler used by HttpMethod s.
DefaultMethodRetryHandler.javaClass The default MethodRetryHandler used by HttpMethodBase.
EchoService.javaClass A service that echos the request body.
ExecuteMethodThread.javaClass Executes a method from a new thread.
FakeHttpMethod.javaClass For test-nohost testing purposes only.
FeedbackService.javaClass
Header.javaClass
HeaderElement.javaClass

One element of an HTTP header's value.

Some HTTP headers (such as the set-cookie header) have values that can be decomposed into multiple elements.

HeaderGroup.javaClass A class for combining a set of headers.
HostConfiguration.javaClass Holds all of the variables needed to describe an HTTP connection to a host.
HttpClient.javaClass

An HTTP "user-agent", containing an HttpState HTTP state and one or more HttpConnection HTTP connections , to which HttpMethod HTTP methods can be applied.


author:
   Remy Maucherat
author:
   Rodney Waldhoff
author:
   Sean C.
HttpClientError.javaClass Signals that an error has occurred.
HttpClientTestBase.javaClass Base class for test cases using org.apache.commons.httpclient.server.SimpleHttpServer based testing framework.
HttpConnection.javaClass An abstraction of an HTTP InputStream and OutputStream pair, together with the relevant attributes.

The following options are set on the socket before getting the input/output streams in the HttpConnection.open() method:
Socket Method Sockets Option Configuration
java.net.Socket.setTcpNoDelay(boolean) SO_NODELAY HttpConnectionParams.setTcpNoDelay(boolean)
java.net.Socket.setSoTimeout(int) SO_TIMEOUT HttpConnectionParams.setSoTimeout(int)
java.net.Socket.setSendBufferSize(int) SO_SNDBUF HttpConnectionParams.setSendBufferSize(int)
java.net.Socket.setReceiveBufferSize(int) SO_RCVBUF HttpConnectionParams.setReceiveBufferSize(int)

author:
   Rod Waldhoff
author:
   Sean C.

HttpConnectionManager.javaInterface An interface for classes that manage HttpConnections.
HttpConstants.javaClass HTTP content conversion routines.
HttpContentTooLargeException.javaClass Signals that the response content was larger than anticipated.
HttpException.javaClass Signals that an HTTP or HttpClient exception has occurred.
HttpHost.javaClass Holds all of the variables needed to describe an HTTP connection to a host.
HttpMethod.javaInterface

HttpMethod interface represents a request to be sent via a HttpConnection HTTP connection and a corresponding response.

HttpMethodBase.javaClass An abstract base implementation of HttpMethod.

At minimum, subclasses will need to override:

When a method requires additional request headers, subclasses will typically want to override:

When a method expects specific response headers, subclasses may want to override:


author:
   Remy Maucherat
author:
   Rodney Waldhoff
author:
   Sean C.
HttpMethodDirector.javaClass Handles the process of executing a method including authentication, redirection and retries.
HttpMethodRetryHandler.javaInterface A handler for determining if an HttpMethod should be retried after a recoverable exception during execution.
HttpParser.javaClass A utility class for parsing http header values according to RFC-2616 Section 4 and 19.3.
HttpRecoverableException.javaClass

Signals that an HTTP or HttpClient exception has occurred.

HttpState.javaClass

A container for HTTP attributes that may persist from request to request, such as Cookie cookies and authentication Credentials credentials .


author:
   Remy Maucherat
author:
   Rodney Waldhoff
author:
   Jeff Dever
author:
   Sean C.
HttpStatus.javaClass Constants enumerating the HTTP status codes.
HttpsURL.javaClass The HTTPS URL.
HttpURL.javaClass The HTTP URL.
HttpVersion.javaClass

HTTP version, as specified in RFC 2616.

HTTP uses a "<major>.<minor>" numbering scheme to indicate versions of the protocol.

InvalidRedirectLocationException.javaClass
MethodRetryHandler.javaInterface A handler for determining if an HttpMethod should be retried after a recoverable exception during execution.
MultiThreadedHttpConnectionManager.javaClass Manages a set of HttpConnections for various HostConfigurations.
author:
   Michael Becke
author:
   Eric Johnson
author:
   Mike Bowler
author:
   Carl A.
NameValuePair.javaClass

A simple class encapsulating a name/value pair.


author:
   B.C.
NoHostHttpConnectionManager.javaClass
NoHttpResponseException.javaClass

Signals that the target server failed to respond with a valid HTTP response.

NoncompliantHeadMethod.javaClass
NoncompliantPostMethod.javaClass
NTCredentials.javaClassCredentials for use with the NTLM authentication scheme which requires additional information.
ProtocolException.javaClass Signals that an HTTP protocol violation has occurred.
ProxyClient.javaClass A client that provides java.net.Socket sockets for communicating through HTTP proxies via the HTTP CONNECT method.
ProxyHost.javaClass Holds all of the variables needed to describe an HTTP connection to a proxy.
ProxyTestDecorator.javaClass A TestDecorator that configures instances of HttpClientTestBase to use a proxy server.
RedirectException.javaClass
ResponseConsumedWatcher.javaInterface When a response stream has been consumed, various parts of the HttpClient implementation need to respond appropriately.
SimpleHttpConnectionManager.javaClass A connection manager that provides access to a single HttpConnection.
StatusLine.javaClass Represents a Status-Line as returned from a HTTP server. RFC2616 states the following regarding the Status-Line:
 6.1 Status-Line
 The first line of a Response message is the Status-Line, consisting
 of the protocol version followed by a numeric status code and its
 associated textual phrase, with each element separated by SP
 characters.
TestAll.javaClass
TestBadContentLength.javaClass Tests HttpClient's behaviour when receiving more response data than expected.
TestConnectionPersistence.javaClass
TestCredentials.javaClass Unit tests for Credentials .
TestEffectiveHttpVersion.javaClass HTTP protocol versioning tests.
TestEntityEnclosingMethod.javaClass Tests specific to entity enclosing methods.
TestEquals.javaClass
TestExceptions.javaClass
TestHeader.javaClass Simple tests for NameValuePair .
TestHeaderElement.javaClass Simple tests for HeaderElement .
author:
   Rodney Waldhoff
author:
   B.C.
TestHeaderOps.javaClass
TestHostConfiguration.javaClass Tests basic HostConfiguration functionality.
TestHttpConnection.javaClass Unit tests for HttpConnection .
author:
   Sean C.
TestHttpConnectionManager.javaClass Unit tests for HttpConnectionManager .
author:
   Marc A.
TestHttpMethodFundamentals.javaClass Tests basic method functionality.
TestHttpParser.javaClass Simple tests for HttpParser .
TestHttps.javaClass Simple tests for HTTPS support in HttpClient. To run this test you'll need: + a JSSE implementation installed (see README.txt) + the java.protocol.handler.pkgs system property set for your provider.
TestHttpState.javaClass Simple tests for HttpState .
author:
   Rodney Waldhoff
author:
   Jeff Dever
author:
   Sean C.
TestHttpStatus.javaClass Unit tests for HttpStatus
author:
   Sean C.
TestHttpVersion.javaClass
TestIdleConnectionTimeout.javaClass
TestMethodAbort.javaClass Tests ability to abort method execution.
TestMethodCharEncoding.javaClass
TestMultipartPost.javaClass Webapp tests specific to the MultiPostMethod.
TestNoHost.javaClass Tests that don't require any external host.
TestNoncompliant.javaClass Tests handling of non-compliant responses.
TestNVP.javaClass Simple tests for NameValuePair .
TestParameterFormatter.javaClass Unit tests for ParameterFormatter .
TestParameterParser.javaClass Unit tests for ParameterParser .
TestPartsNoHost.javaClass
TestPostMethod.javaClass Webapp tests specific to the PostMethod.
TestPostParameterEncoding.javaClass Tests basic method functionality.
TestProxy.javaClass Tests for proxied connections.
TestProxyWithRedirect.javaClass Tests for proxied connections.
TestQueryParameters.javaClass
TestRedirects.javaClass Redirection test cases.
TestRequestHeaders.javaClass Tests for reading response headers.
TestRequestLine.javaClass Simple tests for StatusLine .
TestResponseHeaders.javaClass Tests for reading response headers.
TestStatusLine.javaClass Simple tests for StatusLine .
TestStreams.javaClass
TestURI.javaClass Simple tests for the URI class.
TestURIUtil.javaClass Unit tests for URIUtil .
TestURIUtil2.javaClass Tests the util.URIUtil class.
TestVirtualHost.javaClass HTTP protocol versioning tests.
URI.javaClass The interface for the URI(Uniform Resource Identifiers) version of RFC 2396. This class has the purpose of supportting of parsing a URI reference to extend any specific protocols, the character encoding of the protocol to be transported and the charset of the document.

A URI is always in an "escaped" form, since escaping or unescaping a completed URI might change its semantics.

URIException.javaClass The URI parsing and escape encoding exception.
UsernamePasswordCredentials.javaClass

Username and password Credentials .


author:
   Remy Maucherat
author:
   Sean C.
Wire.javaClass Logs data to the wire LOG.
WireLogInputStream.javaClass Logs all data read to the wire LOG.
WireLogOutputStream.javaClass Logs all data written to the wire LOG.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.