Package org.vrspace.server.obj
Class World
java.lang.Object
org.vrspace.server.obj.Entity
org.vrspace.server.obj.World
- Direct Known Subclasses:
ServerWorld
VRObject container, contains isolated parts of space, like chat room. One
default world is created on startup, others are typically created on demand,
after Enter command is issued.
- Author:
- joe
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
enter
(Client c, WorldManager wm) Called when client enters the world.boolean
void
exit
(Client c, WorldManager wm) Called after client exits the world.@NonNull String
getName()
getOwner()
getToken()
int
hashCode()
boolean
boolean
boolean
void
setDefaultWorld
(boolean defaultWorld) void
void
void
setPublicWorld
(boolean publicWorld) void
setTemporaryWorld
(boolean temporaryWorld) void
toString()
Methods inherited from class org.vrspace.server.obj.Entity
dispose, getId, getObjectId, setId
-
Constructor Details
-
World
-
World
public World() -
World
-
-
Method Details
-
enter
Called when client enters the world. It may change some client properties, allow entrance or not, etc. This implementation checks whether the world is private and owned, and compares the session token.- Parameters:
c
- Client that's asking to enterwm
- WorldManager- Returns:
- true if client is allowed to enter
-
exit
Called after client exits the world. After the owner (if any) exits the world, invalidates the token (if any).- Parameters:
c
- Client exiting the worldwm
- WorldManager
-
tokenName
-
getName
-
isDefaultWorld
public boolean isDefaultWorld() -
isPublicWorld
public boolean isPublicWorld() -
isTemporaryWorld
public boolean isTemporaryWorld() -
getToken
-
getOwner
-
setName
-
setDefaultWorld
public void setDefaultWorld(boolean defaultWorld) -
setPublicWorld
public void setPublicWorld(boolean publicWorld) -
setTemporaryWorld
public void setTemporaryWorld(boolean temporaryWorld) -
setToken
-
setOwner
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-