Interface UserServiceFactory


  • public interface UserServiceFactory
    Factory interface for creating service instances with user-specific authentication.

    Implementations of this interface are responsible for creating Retrofit service proxies that inject the provided UserToken into API requests. This enables per-user authentication without requiring separate HTTP client instances.

    Package-private to control instantiation within the framework.

    See Also:
    UserToken, UserTokenCallRewriter
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <TService> TService create​(java.lang.Class<TService> svcClass, UserToken userToken)
      Creates a service instance that injects the specified user token into all requests.
    • Method Detail

      • create

        <TService> TService create​(java.lang.Class<TService> svcClass,
                                   UserToken userToken)
        Creates a service instance that injects the specified user token into all requests.
        Type Parameters:
        TService - the service interface type
        Parameters:
        svcClass - the service interface class to create
        userToken - the user token to inject into requests
        Returns:
        a proxy instance of the service with token injection capabilities