Class AbstractScimClient<T>

  • Type Parameters:
    T - The type of the internal RestEasy proxy used by this class. This is the same type that ScimClientFactory methods return.
    All Implemented Interfaces:
    CloseableClient, java.io.Serializable, java.lang.reflect.InvocationHandler
    Direct Known Subclasses:
    ScimClient

    public abstract class AbstractScimClient<T>
    extends java.lang.Object
    implements CloseableClient, java.lang.reflect.InvocationHandler, java.io.Serializable
    The base class for specific SCIM clients.

    Upon initialization, this class internally creates a RestEasy proxy client based on parameters passed. This proxy is used to invoke the operations the service offers. The exact methods that can be called are driven by the interface class passed in the constructor.

    When a service method is invoked through an instance obtained by any of the factory methods of ScimClientFactory, the call is dispatched by the invoke method of this class, which properly handles the authorization details in conjunction with the filter AuthorizationInjectionFilter.

    Concrete subclasses of this class must provide getAuthenticationHeader and authorize methods that must implement specific ways to obtain access tokens depending on how the SCIM service is being protected.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
      This method is the single point of dispatch for any and all the requests made to the service.
      void setCustomHeaders​(jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)  
      • Methods inherited from class java.lang.Object

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

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method method,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        This method is the single point of dispatch for any and all the requests made to the service. It takes care of requesting access tokens when necessary and make them available when requests are bound to be issued.

        As with all methods of this class and its subclasses, invoke is not called directly by developers: the calls are triggered when the objects returned by factory methods of ScimClientFactory are manipulated.

        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Returns:
        The response associated to the invocation (normally a jakarta.ws.rs.core.Response instance)
        Throws:
        java.lang.Throwable
      • setCustomHeaders

        public void setCustomHeaders​(jakarta.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> headers)
        Specified by:
        setCustomHeaders in interface CloseableClient