|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.dobj.DObject
com.threerings.crowd.data.PlaceObject
public class PlaceObject
A distributed object that contains information on a place that is occupied by bodies. This place might be a chat room, a game room, an island in a massively multiplayer piratical universe, anything that has occupants that might want to chat with one another.
| Nested Class Summary | |
|---|---|
class |
PlaceObject.ManagerCaller
Exists to make calls into the manager look sensible: _plobj.manager.invoke("someMethod", args); and to route events through the right distributed object manager if we are running in standalone/single-player mode where both client and server are running in the same VM. |
| Nested classes/interfaces inherited from interface com.threerings.crowd.chat.data.SpeakObject |
|---|
SpeakObject.ListenerOp |
| Field Summary | |
|---|---|
PlaceObject.ManagerCaller |
manager
Allows the client to call methods on the manager. |
static String |
OCCUPANT_INFO
The field name of the occupantInfo field. |
DSet<OccupantInfo> |
occupantInfo
Contains an info record (of type OccupantInfo) for each occupant that contains
information about that occupant that needs to be known by everyone in the place. |
OidList |
occupants
Tracks the oid of the body objects of all of the occupants of this place. |
static String |
OCCUPANTS
The field name of the occupants field. |
static String |
SPEAK_SERVICE
The field name of the speakService field. |
SpeakMarshaller |
speakService
Used to generate speak requests on this place object. |
| Fields inherited from class com.threerings.presents.dobj.DObject |
|---|
_controller, _deathWish, _fields, _ftable, _listeners, _locattrs, _locks, _oid, _omgr, _scount, _subs, _tcancelled, _tcount, _tevent, FIELD_COMP, NO_ATTRS |
| Constructor Summary | |
|---|---|
PlaceObject()
|
|
| Method Summary | |
|---|---|
void |
addToOccupantInfo(OccupantInfo elem)
Requests that the specified entry be added to the occupantInfo set. |
void |
addToOccupants(int oid)
Requests that oid be added to the occupants
oid list. |
void |
applyToListeners(SpeakObject.ListenerOp op)
The speak service will call this every time a chat message is delivered on this speak object to note the listeners that received the message. |
OccupantInfo |
getOccupantInfo(Name username)
Looks up a user's occupant info by name. |
void |
initManagerCaller(DObjectManager omgr)
Called on the client when the location director receives this place object to configure our manager caller using the client's distributed object manager. |
void |
removeFromOccupantInfo(Comparable<?> key)
Requests that the entry matching the supplied key be removed from the occupantInfo set. |
void |
removeFromOccupants(int oid)
Requests that oid be removed from the
occupants oid list. |
void |
setOccupantInfo(DSet<OccupantInfo> value)
Requests that the occupantInfo field be set to the
specified value. |
void |
setSpeakService(SpeakMarshaller value)
Requests that the speakService field be set to the
specified value. |
boolean |
shouldBroadcast()
Used to indicate whether broadcast chat messages should be dispatched on this place object. |
void |
updateOccupantInfo(OccupantInfo elem)
Requests that the specified entry be updated in the occupantInfo set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String OCCUPANTS
occupants field.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String OCCUPANT_INFO
occupantInfo field.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String SPEAK_SERVICE
speakService field.
public transient PlaceObject.ManagerCaller manager
public OidList occupants
public DSet<OccupantInfo> occupantInfo
OccupantInfo) for each occupant that contains
information about that occupant that needs to be known by everyone in the place.
Note: Don't obtain occupant info records directly from this set when on the server,
use PlaceManager.getOccupantInfo() instead (along with
PlaceManager.updateOccupantInfo()) because it does some special processing to
ensure that readers and updaters don't step on one another even if they make rapid fire
changes to a user's occupant info.
public SpeakMarshaller speakService
| Constructor Detail |
|---|
public PlaceObject()
| Method Detail |
|---|
public void initManagerCaller(DObjectManager omgr)
public boolean shouldBroadcast()
public OccupantInfo getOccupantInfo(Name username)
public void applyToListeners(SpeakObject.ListenerOp op)
SpeakObject
applyToListeners in interface SpeakObject@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void addToOccupants(int oid)
oid be added to the occupants
oid list. The list will not change until the event is actually
propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void removeFromOccupants(int oid)
oid be removed from the
occupants oid list. The list will not change until the
event is actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void addToOccupantInfo(OccupantInfo elem)
occupantInfo set. The set will not change until the event is
actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void removeFromOccupantInfo(Comparable<?> key)
occupantInfo set. The set will not change until the
event is actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void updateOccupantInfo(OccupantInfo elem)
occupantInfo set. The set will not change until the event is
actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setOccupantInfo(DSet<OccupantInfo> value)
occupantInfo field be set to the
specified value. Generally one only adds, updates and removes
entries of a distributed set, but certain situations call for a
complete replacement of the set value. The local value will be
updated immediately and an event will be propagated through the
system to notify all listeners that the attribute did
change. Proxied copies of this object (on clients) will apply the
value change when they received the attribute changed notification.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setSpeakService(SpeakMarshaller value)
speakService field be set to the
specified value. The local value will be updated immediately and an
event will be propagated through the system to notify all listeners
that the attribute did change. Proxied copies of this object (on
clients) will apply the value change when they received the
attribute changed notification.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||