Class SlingClientConfig


  • @Contract(threading=SAFE)
    public class SlingClientConfig
    extends Object
    • 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
      • values

        protected final Map<String,​String> values
        Extra values to be used in interceptors, custom auth mechanisms, etc.
    • Constructor Detail

      • SlingClientConfig

        protected SlingClientConfig​(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 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