com.googlecode.xremoting.core.http
Class DefaultHttpConnectionFactory

java.lang.Object
  extended by com.googlecode.xremoting.core.http.DefaultHttpConnectionFactory
All Implemented Interfaces:
HttpConnectionFactory

public class DefaultHttpConnectionFactory
extends Object
implements HttpConnectionFactory

HttpConnectionFactory implementation which uses URL#openConnection().

Author:
Roman Puchkovskiy

Constructor Summary
DefaultHttpConnectionFactory()
           
 
Method Summary
protected  void configureConnection(HttpURLConnection connection)
           
 HttpURLConnection openConnection(String url)
          Opens a new connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpConnectionFactory

public DefaultHttpConnectionFactory()
Method Detail

openConnection

public HttpURLConnection openConnection(String url)
                                 throws MalformedURLException,
                                        IOException
Description copied from interface: HttpConnectionFactory
Opens a new connection.

Specified by:
openConnection in interface HttpConnectionFactory
Parameters:
url - URL to which to open connection via HTTP/HTTPS.
Returns:
connection
Throws:
MalformedURLException - if URL is not correct
IOException - if any other error occurs (like no route to host)

configureConnection

protected void configureConnection(HttpURLConnection connection)


Copyright © 2013. All Rights Reserved.