diff --git a/src/java/org/apache/http/auth/AuthPolicy.java b/src/java/org/apache/http/auth/AuthSchemeRegistry.java
similarity index 94%
rename from src/java/org/apache/http/auth/AuthPolicy.java
rename to src/java/org/apache/http/auth/AuthSchemeRegistry.java
index 2d7d6b953..1f53befb6 100644
--- a/src/java/org/apache/http/auth/AuthPolicy.java
+++ b/src/java/org/apache/http/auth/AuthSchemeRegistry.java
@@ -39,17 +39,17 @@ import org.apache.http.cookie.CookieSpecFactory;
import org.apache.http.params.HttpParams;
/**
- * Authentication policy class. The Authentication policy provides corresponding
- * authentication scheme interfrace for a given type of authorization challenge.
+ * Authentication scheme registry that can be used to obtain the corresponding
+ * authentication scheme implementation for a given type of authorization challenge.
*
* @author Oleg Kalnichevski
*
* @version $Revision$
* @since 3.0
*/
-public final class AuthPolicy {
+public final class AuthSchemeRegistry {
- public final static AuthPolicy DEFAULT = new AuthPolicy();
+ public final static AuthSchemeRegistry DEFAULT = new AuthSchemeRegistry();
private final Map registeredSchemes = new LinkedHashMap();
diff --git a/src/java/org/apache/http/cookie/CookiePolicy.java b/src/java/org/apache/http/cookie/CookieSpecRegistry.java
similarity index 94%
rename from src/java/org/apache/http/cookie/CookiePolicy.java
rename to src/java/org/apache/http/cookie/CookieSpecRegistry.java
index 350be0265..da19e0e8f 100644
--- a/src/java/org/apache/http/cookie/CookiePolicy.java
+++ b/src/java/org/apache/http/cookie/CookieSpecRegistry.java
@@ -40,21 +40,22 @@ import org.apache.http.cookie.params.CookieSpecParams;
import org.apache.http.params.HttpParams;
/**
- * Cookie management policy class. The cookie policy provides corresponding
- * cookie management interfrace for a given type or version of cookie.
+ * Cookie specification registry that can be used to obtain the corresponding
+ * cookie specification implementation for a given type of type or version of
+ * cookie.
*
* @author Oleg Kalnichevski
* @author Mike Bowler
*
* @since 4.0
*/
-public final class CookiePolicy {
+public final class CookieSpecRegistry {
- public final static CookiePolicy DEFAULT = new CookiePolicy();
+ public final static CookieSpecRegistry DEFAULT = new CookieSpecRegistry();
private final Map registeredSpecs;
- public CookiePolicy() {
+ public CookieSpecRegistry() {
super();
this.registeredSpecs = new LinkedHashMap();
}
diff --git a/src/java/org/apache/http/cookie/params/CookieSpecParams.java b/src/java/org/apache/http/cookie/params/CookieSpecParams.java
index f3b19cb04..5779897b1 100644
--- a/src/java/org/apache/http/cookie/params/CookieSpecParams.java
+++ b/src/java/org/apache/http/cookie/params/CookieSpecParams.java
@@ -105,7 +105,7 @@ public final class CookieSpecParams {
}
/**
- * Assigns the {@link org.apache.http.cookie.CookiePolicy cookie policy} to be used
+ * Assigns the {@link org.apache.http.cookie.CookieSpecRegistry cookie policy} to be used
* when executing a request based on these parameters.
*
* @param policy the cookie policy
diff --git a/src/test/org/apache/http/cookie/TestCookiePolicy.java b/src/test/org/apache/http/cookie/TestCookiePolicy.java
index 8a357f625..6dbc6c6ef 100644
--- a/src/test/org/apache/http/cookie/TestCookiePolicy.java
+++ b/src/test/org/apache/http/cookie/TestCookiePolicy.java
@@ -45,7 +45,7 @@ import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
/**
- * Test cases for {@link CookiePolicy}.
+ * Test cases for {@link CookieSpecRegistry}.
*/
public class TestCookiePolicy extends TestCase {
@@ -63,7 +63,7 @@ public class TestCookiePolicy extends TestCase {
}
public void testRegisterUnregisterCookieSpecFactory() {
- CookiePolicy registry = CookiePolicy.DEFAULT;
+ CookieSpecRegistry registry = CookieSpecRegistry.DEFAULT;
List names = registry.getSpecNames();
assertNotNull(names);
assertEquals(0, names.size());
@@ -98,7 +98,7 @@ public class TestCookiePolicy extends TestCase {
}
public void testGetNewCookieSpec() {
- CookiePolicy registry = CookiePolicy.DEFAULT;
+ CookieSpecRegistry registry = CookieSpecRegistry.DEFAULT;
registry.register(CookieSpecParams.BROWSER_COMPATIBILITY,
new BrowserCompatSpecFactory());
registry.register(CookieSpecParams.NETSCAPE,
@@ -131,7 +131,7 @@ public class TestCookiePolicy extends TestCase {
}
public void testInvalidInput() {
- CookiePolicy registry = CookiePolicy.DEFAULT;
+ CookieSpecRegistry registry = CookieSpecRegistry.DEFAULT;
try {
registry.register(null, null);
fail("IllegalArgumentException should have been thrown");