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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanclearToken(String serviceId) Remove token for a given serviceintCreate client's scene, called by WorldManager during login process.booleanIdentity is a big unknown yet, will likely get encapsulated in a class.com.fasterxml.jackson.databind.ObjectMapperMapper for publicly visible propertiesgetName()Client name - unique ID.URL of the file with avatar/profile picturecom.fasterxml.jackson.databind.ObjectMapperPrivate 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.ConcurrentWebSocketSessionDecoratorWeb 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.inthashCode()booleanisGuest()guest flag hints SceneManager to remove all created/owned object when client disconnectsvoidprocessEvent(VREvent event) Process an event received from other active objects, typically other users.voidsendMessage(Object obj) voidsetGuest(boolean guest) guest flag hints SceneManager to remove all created/owned object when client disconnectsvoidsetIdentity(String identity) Identity is a big unknown yet, will likely get encapsulated in a class.voidsetMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) Mapper for publicly visible propertiesvoidClient name - unique ID.voidsetPicture(String picture) URL of the file with avatar/profile picturevoidsetPrivateMapper(com.fasterxml.jackson.databind.ObjectMapper privateMapper) Private mapper even serializes private fields (so that client can receive own secrets)voidScene contains all object that a client tracks, e.g.voidsetSceneProperties(SceneProperties sceneProperties) voidsetSession(org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator session) Web socket.voidSet token for a given servicevoidTokens used to access video/audio streaming servers, identify conversations with chatbots etc.voidsetUserHeight(Double userHeight) User's height in real life, used in VR.voidsetWriteBack(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, isDeleted, isPermanent, isTemporary, notifyListeners, passive, removeListener, setActive, setAnimation, setChildren, setDeleted, setListeners, setMesh, setPermanent, setPosition, setProperties, setRotation, setScale, setScript, setTemporary, setWorld, setWorldIdMethods 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:
processEventin 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. -
getPicture
URL of the file with avatar/profile picture -
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. Transient, never stored to the database. -
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. -
setPicture
URL of the file with avatar/profile picture -
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. Transient, never stored to the database. -
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
-