net.sf.sparql.benchmarking.util
Class RandomAuthenticatorPool
java.lang.Object
net.sf.sparql.benchmarking.util.RandomAuthenticatorPool
- All Implemented Interfaces:
- HttpAuthenticator
public class RandomAuthenticatorPool
- extends Object
- implements HttpAuthenticator
An authenticator which selects from a pool of authenticators at random for
each request.
This can be useful when you want to perform testing that covers the use of
multiple authentication methods or different sets of credentials.
- Author:
- rvesse
Method Summary |
void |
apply(org.apache.http.impl.client.AbstractHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
URI target)
|
void |
invalidate()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomAuthenticatorPool
public RandomAuthenticatorPool(Collection<HttpAuthenticator> authenticators)
- Creates a new authenticator
- Parameters:
authenticators
- Pool of authenticators where each represents a possible
authentication method and/or set of credentials
apply
public void apply(org.apache.http.impl.client.AbstractHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
URI target)
- Specified by:
apply
in interface HttpAuthenticator
invalidate
public void invalidate()
- Specified by:
invalidate
in interface HttpAuthenticator
Copyright © 2014. All Rights Reserved.