com.sun.jersey.client.urlconnection
Class URLConnectionClientHandler
java.lang.Object
com.sun.jersey.api.client.RequestWriter
com.sun.jersey.api.client.TerminatingClientHandler
com.sun.jersey.client.urlconnection.URLConnectionClientHandler
- All Implemented Interfaces:
- ClientHandler
public final class URLConnectionClientHandler
- extends TerminatingClientHandler
A terminating client handler that uses HttpURLConnection or
HttpsURLConnection to make HTTP requests and receive HTTP responses.
By default a HttpURLConnection or HttpsURLConnection
instance is obtained using URL.openConnection(). This behaviour
may be overridden by registering an HttpURLConnectionFactory
instance when constructing this class.
For SSL configuration of HTTPS the HTTPSProperties may be used
and an instance added as a property of the Client or
ClientRequest.
- Author:
- Paul.Sandoz@Sun.Com
- See Also:
HttpURLConnectionFactory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_HTTP_URL_CONNECTION_SET_METHOD_WORKAROUND
public static final java.lang.String PROPERTY_HTTP_URL_CONNECTION_SET_METHOD_WORKAROUND
- A value of "true" declares that the client will try
to set unsupported HTTP method to HttpURLConnection via reflection.
Enabling this feature might cause security related warnings/errors
and it might break when other JDK implementation is used.
Use only when you know what you are doing.
The value MUST be an instance of
Boolean.
If the property is absent then the default value is "false".
- See Also:
- Constant Field Values
URLConnectionClientHandler
public URLConnectionClientHandler(HttpURLConnectionFactory httpURLConnectionFactory)
- Construct a new instance with an HTTP URL connection factory.
- Parameters:
httpURLConnectionFactory - the HTTP URL connection factory.
URLConnectionClientHandler
public URLConnectionClientHandler()
handle
public ClientResponse handle(ClientRequest ro)
- ClientRequest handler.
- Parameters:
ro - ClientRequest
- Returns:
- Server response represented as ClientResponse
Copyright © 2011 Oracle Corporation. All Rights Reserved.