Package org.apache.sling.testing.clients
Class SlingClientConfig
- java.lang.Object
-
- org.apache.sling.testing.clients.SlingClientConfig
-
@Contract(threading=SAFE) public class SlingClientConfig extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSlingClientConfig.Builder
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.http.client.AuthCacheauthCacheAuthCache for preemptive authprotected org.apache.http.client.CookieStorecookieStoreThe cookie storeprotected org.apache.http.client.CredentialsProvidercredsProviderThe credentials providerprotected StringpasswordPassword of the user that will be used to authenticate the requests.protected URIurlBase URI of the server under test.protected StringuserName of the user that will be used to authenticate the requests.protected Map<String,String>valuesExtra values to be used in interceptors, custom auth mechanisms, etc.
-
Constructor Summary
Constructors Modifier Constructor Description protectedSlingClientConfig(URI url, String user, String password, org.apache.http.client.CookieStore cookieStore, org.apache.http.client.CredentialsProvider credentialsProvider, org.apache.http.client.AuthCache authCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.http.client.AuthCachegetAuthCache()org.apache.http.client.CookieStoregetCookieStore()org.apache.http.client.CredentialsProvidergetCredsProvider()StringgetPassword()URIgetUrl()StringgetUser()Map<String,String>getValues()Get the map of extra custom values configured on the client
-
-
-
Field Detail
-
url
protected final URI url
Base URI of the server under test.
-
user
protected final String user
Name of the user that will be used to authenticate the requests.
-
password
protected final String password
Password of the user that will be used to authenticate the requests.
-
cookieStore
protected final org.apache.http.client.CookieStore cookieStore
The cookie store
-
credsProvider
protected final org.apache.http.client.CredentialsProvider credsProvider
The credentials provider
-
authCache
protected final org.apache.http.client.AuthCache authCache
AuthCache for preemptive auth
-
-
Method Detail
-
getUrl
public URI getUrl()
- Returns:
- the base URL that the sling client is pointing to. It should always end with a "/"
-
getUser
public String getUser()
- Returns:
- the user that the client is using.
-
getPassword
public String getPassword()
- Returns:
- the user that the client is using.
-
getValues
public Map<String,String> getValues()
Get the map of extra custom values configured on the client
These may be used by interceptors, for example
- Returns:
- the reference to the map
-
getCookieStore
public org.apache.http.client.CookieStore getCookieStore()
- Returns:
- a reference to the cookie store used by the client
-
getCredsProvider
public org.apache.http.client.CredentialsProvider getCredsProvider()
- Returns:
- the reference to the CredentialsProvider used by the client
-
getAuthCache
public org.apache.http.client.AuthCache getAuthCache()
- Returns:
- the reference the AuthCache used by the client
-
-