abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r771442 - /abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
Date Mon, 04 May 2009 21:08:53 GMT
Author: jmsnell
Date: Mon May  4 21:08:53 2009
New Revision: 771442

URL: http://svn.apache.org/viewvc?rev=771442&view=rev
Log:
Creating AbderaClient using preconfigured HttpClient

Modified:
    abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java

Modified: abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
URL: http://svn.apache.org/viewvc/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java?rev=771442&r1=771441&r2=771442&view=diff
==============================================================================
--- abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
(original)
+++ abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbderaClient.java
Mon May  4 21:08:53 2009
@@ -119,6 +119,30 @@
     setAuthenticationSchemeDefaults();
     setMaximumRedirects(DEFAULT_MAX_REDIRECTS);
   }
+
+  /**
+   * Create an Abdera using a preconfigured HttpClient object
+   * @param client An Apache HttpClient object
+   */
+  public AbderaClient( 
+    HttpClient client) {
+      this(new Abdera(),client);
+  }
+
+  /**
+   * Create an Abdera using a preconfigured HttpClient object
+   * @param abdera
+   * @param client An Apache HttpClient object
+   */
+  public AbderaClient(
+    Abdera abdera, 
+    HttpClient client) {
+      this.abdera = abdera;
+      this.cache = initCache(initCacheFactory());
+      this.client = client;
+      setAuthenticationSchemeDefaults();
+      setMaximumRedirects(DEFAULT_MAX_REDIRECTS);
+  }
   
   /**
    * Create an AbderaClient instance using the specified Abdera instance



Mime
View raw message