Renamed CookiePolicy to CookieSpecRegistry and AuthPolicy to AuthSchemeRegistry
git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@527903 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
134b0bf0f9
commit
1554373cf8
|
@ -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 <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||
*
|
||||
* @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();
|
||||
|
|
@ -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 <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a>
|
||||
* @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a>
|
||||
*
|
||||
* @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();
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue