Class DefaultClientFactory

    • Constructor Detail

      • DefaultClientFactory

        public DefaultClientFactory()
    • Method Detail

      • createGuestClient

        public <T extends Client> T createGuestClient​(Class<T> clientClass,
                                                      org.springframework.http.HttpHeaders headers,
                                                      Map<String,​Object> attributes)
        Returns new client.
        Specified by:
        createGuestClient in interface ClientFactory
        Parameters:
        clientClass - class implementing the client, typically User
        headers - all HTTP headers
        attributes - session attributes copied from HttpSession
        Returns:
        new Client instance, null by default
      • findClient

        public <T extends Client> T findClient​(Class<T> clientClass,
                                               Principal principal,
                                               VRObjectRepository db,
                                               org.springframework.http.HttpHeaders headers,
                                               Map<String,​Object> attributes)
        Returns client existing in the database, identified by "local-user-name" attribute value.
        Specified by:
        findClient in interface ClientFactory
        Parameters:
        clientClass - class implementing the client, typically User
        principal - security principal of the client
        db - database repository
        headers - all HTTP headers
        attributes - session attributes copied from HttpSession
        Returns:
        a client found in the database or elsewhere