Package org.vrspace.server.obj
Class Client
java.lang.Object
org.vrspace.server.obj.Entity
org.vrspace.server.obj.VRObject
org.vrspace.server.obj.Client
- Direct Known Subclasses:
RemoteServer
,User
Basic client class, adds user-related properties and business logic to
VRObject.
- Author:
- joe
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
clearToken
(String serviceId) Remove token for a given servicevoid
Create client's scene, called by WorldManager during login process.boolean
Identity is a big unknown yet, will likely get encapsulated in a class.com.fasterxml.jackson.databind.ObjectMapper
Mapper for publicly visible propertiesgetName()
Client name - unique ID.com.fasterxml.jackson.databind.ObjectMapper
Private mapper even serializes private fields (so that client can receive own secrets)getScene()
Scene contains all object that a client tracks, e.g.org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator
Web socket.Returns token for a given serviceTokens used to access video/audio streaming servers, identify conversations with chatbots etc.User's height in real life, used in VR.Write-back cache to persist changes to all properties.int
hashCode()
boolean
isGuest()
guest flag hints SceneManager to remove all created/owned object when client disconnectsvoid
processEvent
(VREvent event) Process an event received from other active objects, typically other users.void
sendMessage
(Object obj) void
setGuest
(boolean guest) guest flag hints SceneManager to remove all created/owned object when client disconnectsvoid
setIdentity
(String identity) Identity is a big unknown yet, will likely get encapsulated in a class.void
setMapper
(com.fasterxml.jackson.databind.ObjectMapper mapper) Mapper for publicly visible propertiesvoid
Client name - unique ID.void
setPrivateMapper
(com.fasterxml.jackson.databind.ObjectMapper privateMapper) Private mapper even serializes private fields (so that client can receive own secrets)void
Scene contains all object that a client tracks, e.g.void
setSceneProperties
(SceneProperties sceneProperties) void
setSession
(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator session) Web socket.void
Set token for a given servicevoid
Tokens used to access video/audio streaming servers, identify conversations with chatbots etc.void
setUserHeight
(Double userHeight) User's height in real life, used in VR.void
setWriteBack
(WriteBack writeBack) Write-back cache to persist changes to all properties.toString()
Methods inherited from class org.vrspace.server.obj.VRObject
active, addChildren, addListener, getActive, getAnimation, getChildren, getListeners, getMesh, getPermanent, getPosition, getProperties, getRotation, getScale, getScript, getTemporary, getWorld, getWorldId, isActive, isPermanent, isTemporary, notifyListeners, passive, removeListener, setActive, setAnimation, setChildren, setListeners, setMesh, setPermanent, setPosition, setProperties, setRotation, setScale, setScript, setTemporary, setWorld, setWorldId
Methods inherited from class org.vrspace.server.obj.Entity
dispose, getId, getObjectId, setId
-
Constructor Details
-
Client
public Client() -
Client
-
Client
-
Client
public Client(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator session)
-
-
Method Details
-
processEvent
Process an event received from other active objects, typically other users. This implementation serializes the event and sends it over websocket.- Overrides:
processEvent
in classVRObject
- Parameters:
event
- Whatever has changed
-
sendMessage
-
getToken
Returns token for a given service -
setToken
Set token for a given service -
clearToken
Remove token for a given service -
createScene
Create client's scene, called by WorldManager during login process. Default client doesn't have a scene. -
getName
Client name - unique ID. -
getUserHeight
User's height in real life, used in VR. Transient biometric data. -
getSceneProperties
-
getScene
Scene contains all object that a client tracks, e.g. user sees. -
getIdentity
Identity is a big unknown yet, will likely get encapsulated in a class. For the time being, it's something like username@oauth2provider, e.g. joe@facebook -
getTokens
Tokens used to access video/audio streaming servers, identify conversations with chatbots etc. -
getWriteBack
Write-back cache to persist changes to all properties. -
getSession
public org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator getSession()Web socket. -
getMapper
public com.fasterxml.jackson.databind.ObjectMapper getMapper()Mapper for publicly visible properties -
getPrivateMapper
public com.fasterxml.jackson.databind.ObjectMapper getPrivateMapper()Private mapper even serializes private fields (so that client can receive own secrets) -
isGuest
public boolean isGuest()guest flag hints SceneManager to remove all created/owned object when client disconnects -
setName
Client name - unique ID. -
setUserHeight
User's height in real life, used in VR. Transient biometric data. -
setSceneProperties
-
setScene
Scene contains all object that a client tracks, e.g. user sees. -
setIdentity
Identity is a big unknown yet, will likely get encapsulated in a class. For the time being, it's something like username@oauth2provider, e.g. joe@facebook -
setTokens
Tokens used to access video/audio streaming servers, identify conversations with chatbots etc. -
setWriteBack
Write-back cache to persist changes to all properties. -
setSession
public void setSession(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator session) Web socket. -
setMapper
public void setMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Mapper for publicly visible properties -
setPrivateMapper
public void setPrivateMapper(com.fasterxml.jackson.databind.ObjectMapper privateMapper) Private mapper even serializes private fields (so that client can receive own secrets) -
setGuest
public void setGuest(boolean guest) guest flag hints SceneManager to remove all created/owned object when client disconnects -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-