Class SlingClientConfig


  • @ThreadSafe
    public class SlingClientConfig
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.http.client.AuthCache authCache
      AuthCache for preemptive auth
      protected org.apache.http.client.CookieStore cookieStore
      The cookie store
      protected org.apache.http.client.CredentialsProvider credsProvider
      The credentials provider
      protected java.lang.String password
      Password of the user that will be used to authenticate the requests.
      protected java.net.URI url
      Base URI of the server under test.
      protected java.lang.String user
      Name of the user that will be used to authenticate the requests.
      protected java.util.Map<java.lang.String,​java.lang.String> values
      Extra values to be used in interceptors, custom auth mechanisms, etc.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SlingClientConfig​(java.net.URI url, java.lang.String user, java.lang.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.AuthCache getAuthCache()  
      org.apache.http.client.CookieStore getCookieStore()  
      org.apache.http.client.CredentialsProvider getCredsProvider()  
      java.lang.String getPassword()  
      java.net.URI getUrl()  
      java.lang.String getUser()  
      java.util.Map<java.lang.String,​java.lang.String> getValues()
      Get the map of extra custom values configured on the client
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • url

        protected final java.net.URI url
        Base URI of the server under test.
      • user

        protected final java.lang.String user
        Name of the user that will be used to authenticate the requests.
      • password

        protected final java.lang.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 java.util.Map<java.lang.String,​java.lang.String> values
        Extra values to be used in interceptors, custom auth mechanisms, etc.
    • Constructor Detail

      • SlingClientConfig

        protected SlingClientConfig​(java.net.URI url,
                                    java.lang.String user,
                                    java.lang.String password,
                                    org.apache.http.client.CookieStore cookieStore,
                                    org.apache.http.client.CredentialsProvider credentialsProvider,
                                    org.apache.http.client.AuthCache authCache)
    • Method Detail

      • getUrl

        public java.net.URI getUrl()
        Returns:
        the base URL that the sling client is pointing to. It should always end with a "/"
      • getUser

        public java.lang.String getUser()
        Returns:
        the user that the client is using.
      • getPassword

        public java.lang.String getPassword()
        Returns:
        the user that the client is using.
      • getValues

        public java.util.Map<java.lang.String,​java.lang.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