com.sun.jersey.client.urlconnection
Class URLConnectionClientHandler

java.lang.Object
  extended by com.sun.jersey.api.client.TerminatingClientHandler
      extended by 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:
[email protected]
See Also:
HttpURLConnectionFactory

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jersey.api.client.TerminatingClientHandler
TerminatingClientHandler.RequestEntityWriter, TerminatingClientHandler.RequestEntityWriterListener
 
Field Summary
 
Fields inherited from class com.sun.jersey.api.client.TerminatingClientHandler
EMPTY_ANNOTATIONS
 
Constructor Summary
URLConnectionClientHandler()
           
URLConnectionClientHandler(HttpURLConnectionFactory httpURLConnectionFactory)
          Construct a new instance with an HTTP URL connection factory.
 
Method Summary
 ClientResponse handle(ClientRequest ro)
          ClientRequest handler.
 
Methods inherited from class com.sun.jersey.api.client.TerminatingClientHandler
getMessageBodyWorkers, getRequestEntityWriter, headerValueToString, writeRequestEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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()
Method Detail

handle

public ClientResponse handle(ClientRequest ro)
ClientRequest handler.

Parameters:
ro - ClientRequest
Returns:
Server response represented as ClientResponse


Copyright © 2010 Oracle Corporation. All Rights Reserved.