net.oauth.client
Class URLConnectionClient

java.lang.Object
  extended by net.oauth.client.URLConnectionClient
All Implemented Interfaces:
HttpClient

public class URLConnectionClient
extends java.lang.Object
implements HttpClient

An HttpClient based on HttpURLConnection.

HttpClient3 or HttpClient4 perform better than this class, as a rule; since they do things like connection pooling. They also support reading the body of an HTTP response whose status code isn't 200 (OK), which can enable your application to handle problems better.

Author:
John Kristian

Field Summary
 
Fields inherited from interface net.oauth.http.HttpClient
CONNECT_TIMEOUT, DELETE, FOLLOW_REDIRECTS, GET, POST, PUT, READ_TIMEOUT
 
Constructor Summary
URLConnectionClient()
           
 
Method Summary
 HttpResponseMessage execute(HttpMessage request, java.util.Map<java.lang.String,java.lang.Object> parameters)
          Send a message to the service provider and get the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLConnectionClient

public URLConnectionClient()
Method Detail

execute

public HttpResponseMessage execute(HttpMessage request,
                                   java.util.Map<java.lang.String,java.lang.Object> parameters)
                            throws java.io.IOException
Send a message to the service provider and get the response.

Specified by:
execute in interface HttpClient
parameters - HTTP client parameters, as a map from parameter name to value. Parameter names are defined as constants below.
Throws:
java.io.IOException


Copyright © 2009. All Rights Reserved.