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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanenter(Client c, WorldManager wm) Called when client enters the world.booleanvoidexit(Client c, WorldManager wm) Called after client exits the world.Optional description of the world@NonNull StringgetName()Unique world namegetOwner()Optional URL of world image displayed on the portalgetToken()inthashCode()booleanThere can be only one *booleanCan all users enter the worldbooleanTemporary worlds are created on demandvoidsetDefaultWorld(boolean defaultWorld) There can be only one *voidsetDescription(String description) Optional description of the worldvoidUnique world namevoidvoidsetPublicWorld(boolean publicWorld) Can all users enter the worldvoidsetTemporaryWorld(boolean temporaryWorld) Temporary worlds are created on demandvoidsetThumbnail(String thumbnail) Optional URL of world image displayed on the portalvoidtoString()Methods inherited from class org.vrspace.server.obj.Entity
dispose, getId, getObjectId, setId
-
Constructor Details
-
World
-
World
public World() -
World
Creates a newWorldinstance.- Parameters:
name- Unique world name
-
-
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
Unique world name -
getDescription
Optional description of the world -
getThumbnail
Optional URL of world image displayed on the portal -
isDefaultWorld
public boolean isDefaultWorld()There can be only one * -
isPublicWorld
public boolean isPublicWorld()Can all users enter the world -
isTemporaryWorld
public boolean isTemporaryWorld()Temporary worlds are created on demand -
getToken
-
getOwner
-
setName
Unique world name -
setDescription
Optional description of the world -
setThumbnail
Optional URL of world image displayed on the portal -
setDefaultWorld
public void setDefaultWorld(boolean defaultWorld) There can be only one * -
setPublicWorld
public void setPublicWorld(boolean publicWorld) Can all users enter the world -
setTemporaryWorld
public void setTemporaryWorld(boolean temporaryWorld) Temporary worlds are created on demand -
setToken
-
setOwner
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-