Package org.vrspace.server.core
Class DefaultClientFactory
- java.lang.Object
-
- org.vrspace.server.core.DefaultClientFactory
-
- All Implemented Interfaces:
ClientFactory
@Component public class DefaultClientFactory extends Object implements ClientFactory
-
-
Field Summary
-
Fields inherited from interface org.vrspace.server.core.ClientFactory
CLIENT_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description DefaultClientFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Client
createGuestClient(org.springframework.http.HttpHeaders headers, Map<String,Object> attributes)
Returns new client.Client
findClient(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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.vrspace.server.core.ClientFactory
clientAttribute, handleUnknownClient
-
-
-
-
Method Detail
-
createGuestClient
public Client createGuestClient(org.springframework.http.HttpHeaders headers, Map<String,Object> attributes)
Returns new client.- Specified by:
createGuestClient
in interfaceClientFactory
- Parameters:
headers
- all HTTP headersattributes
- session attributes copied from HttpSession- Returns:
- new Client instance, null by default
-
findClient
public Client findClient(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 interfaceClientFactory
- Parameters:
principal
- security principal of the clientdb
- database repositoryheaders
- all HTTP headersattributes
- session attributes copied from HttpSession- Returns:
- a client found in the database or elsewhere
-
-