|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AbstractRoom
WRITEME: The documentation for this type (AbstractRoom) is incomplete. (brpocock, Jan 11, 2010)
Method Summary | |
---|---|
void |
add(GameEvent game)
|
boolean |
contains(AbstractUser user)
TODO: document this method (brpocock, Oct 28, 2009) |
void |
deleteVariable(String string)
|
void |
destroySelf()
WRITEME |
void |
flush()
This is an overriding method. |
void |
fromJSON(org.json.JSONObject jso)
TODO: document this method (brpocock, Oct 21, 2009) |
Set<RoomListener> |
getAllListeners()
|
Collection<AbstractUser> |
getAllUsers()
|
String |
getDebugName()
Get the debugging version of the room's name. |
String |
getFilename()
|
GameEvent |
getGameEvent()
|
int |
getId()
Deprecated. |
int |
getID()
|
Collection<RoomListener> |
getListeners()
TODO: document this method (brpocock, Nov 24, 2009) |
int |
getMaxUsers()
|
String |
getMoniker()
|
String |
getMusic()
TODO: document this method (brpocock, Oct 13, 2009) |
String |
getName()
|
String |
getOverlay()
|
AbstractUser |
getOwner()
|
int |
getRoomIndex()
Get the index of this room within the set of rooms to which it belongs. |
String |
getSky()
|
String |
getTitle()
Get the room's string title |
int |
getUserCount()
|
String |
getVariable(String string)
|
HashMap<String,String> |
getVariables()
Get the set of all variables which are attached to this room |
AbstractZone |
getZone()
|
int |
hashCode()
This is an overriding method. |
boolean |
isLimbo()
A “limbo” room is a room in which no public messaging is carried out. |
boolean |
isSkyVisible()
|
void |
join(RoomListener thing)
Notify this room (and anyone in it) that someone has joined |
void |
part(RoomListener roomListener)
|
void |
sendGameAction(User from,
org.json.JSONObject data)
Propagate a game event to every user in the room. |
void |
sendPublicMessage(AbstractUser from,
String speech)
|
void |
setFilename(String filename1)
|
void |
setLimbo(boolean b)
|
void |
setMoniker(String moniker1)
|
void |
setMusic(String music1)
|
void |
setOverlay(String overlay1)
|
void |
setOwner(AbstractUser newHomeOwner)
TODO: document this method (brpocock, Jan 13, 2010) |
void |
setRoomVars()
WRITEME |
void |
setSky(String sky1)
|
void |
setSkyVisible(boolean skyVisible1)
|
void |
setTitle(String newTitle)
TODO: document this method (brpocock, Oct 5, 2009) |
void |
setVariable(Map.Entry<String,String> var)
|
void |
setVariable(String varName,
String varValue)
Set a room variable. |
void |
setVariables(Map<String,String> map)
|
org.json.JSONObject |
toJSON()
|
Method Detail |
---|
void add(GameEvent game)
game
- WRITEMEboolean contains(AbstractUser user)
user
- who
void deleteVariable(String string)
string
- WRITEMEvoid destroySelf()
void flush()
SQLPeerDatum.flush()
void fromJSON(org.json.JSONObject jso) throws org.json.JSONException
jso
- Serialized form
org.json.JSONException
- if the incoming data isn't in the right
formSet<RoomListener> getAllListeners()
Collection<AbstractUser> getAllUsers()
String getDebugName()
Get the debugging version of the room's name. This is based upon the moniker and zone, or identifies the room as an abstract room if it is not a part of a zone.
String getFilename()
GameEvent getGameEvent()
@Deprecated int getId()
getID()
int getID()
Collection<RoomListener> getListeners()
int getMaxUsers()
String getMoniker()
String getMusic()
String getName()
String getOverlay()
AbstractUser getOwner()
int getRoomIndex()
Get the index of this room within the set of rooms to which it belongs.
For user-created rooms, this is the index of the room number within the user's “house,” typically 0 for the first room, 1 for the yard, and 2 or more for additional rooms.
The meaning of this index varies depending upon context; presently, it is only meaningful for user houses.
String getSky()
String getTitle()
int getUserCount()
String getVariable(String string)
string
- the variable name for which the value is requested
HashMap<String,String> getVariables()
AbstractZone getZone()
int hashCode()
hashCode
in class Object
Object.hashCode()
boolean isLimbo()
A “limbo” room is a room in which no public messaging is carried out. Users are unaware of one another's presence, comings and goings, and there are no public messages. The default “limbo” room is named “nowhere”
boolean isSkyVisible()
void join(RoomListener thing)
thing
- the thing that has joined the roomvoid part(RoomListener roomListener)
roomListener
- the thing which wants to stop listening to the roomvoid sendGameAction(User from, org.json.JSONObject data) throws org.json.JSONException
from
- WRITEMEdata
- WRITEME
org.json.JSONException
- if the action can't be represented in JSONvoid sendPublicMessage(AbstractUser from, String speech)
from
- WRITEMEspeech
- WRITEMEvoid setFilename(String filename1)
filename1
- the filename to setvoid setLimbo(boolean b)
b
- true, if this is a limbo roomvoid setMoniker(String moniker1)
moniker1
- the moniker to setvoid setMusic(String music1)
music1
- the new background musicvoid setOverlay(String overlay1)
overlay1
- the overlay to setvoid setOwner(AbstractUser newHomeOwner)
newHomeOwner
- new home ownervoid setRoomVars()
void setSky(String sky1)
sky1
- the sky to setvoid setSkyVisible(boolean skyVisible1)
skyVisible1
- the skyVisible to setvoid setTitle(String newTitle)
newTitle
- WRITEMEvoid setVariable(Map.Entry<String,String> var)
var
- A Hash type Entry object containing a key-value pair
to be used to set a variable.void setVariable(String varName, String varValue)
varName
- the name of the room variable to altervarValue
- the new valuevoid setVariables(Map<String,String> map)
map
- a map containing variables andorg.json.JSONObject toJSON()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |