public class BodyObject extends ClientObject implements SpeakObject
SpeakObject.ListenerOpStreamable.Closure| Modifier and Type | Field and Description |
|---|---|
static String |
AWAY_MESSAGE
The field name of the
awayMessage field. |
String |
awayMessage
If non-null, this contains a message to be auto-replied whenever another user delivers a
tell message to this user.
|
Place |
location
Identifies the place currently occupied by this body.
|
static String |
LOCATION
The field name of the
location field. |
byte |
status
The user's current status (
OccupantInfo.ACTIVE, etc.). |
static String |
STATUS
The field name of the
status field. |
CLOBJ_CHANGED, receivers, RECEIVERS, username, USERNAMEDEFAULT_IDENTIFIER| Constructor and Description |
|---|
BodyObject() |
| Modifier and Type | Method and Description |
|---|---|
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 |
createOccupantInfo(PlaceObject plobj)
Creates a blank occupant info instance that will used to publish information about the
various bodies occupying a place.
|
void |
didLeavePlace(PlaceObject plobj)
Called when this body has left its occupied place.
|
String |
getChatIdentifier(UserMessage message)
Returns an identifier for what type of chat this speak object represents based on the message.
|
ClientObject |
getClientObject()
Return the
ClientObject that represent our driving user's connection. |
int |
getPlaceOid()
Returns the oid of the place occupied by this body or -1 if we occupy no place.
|
TokenRing |
getTokens()
Returns this user's access control tokens.
|
Name |
getVisibleName()
Returns the name that should be displayed to other users.
|
void |
setAwayMessage(String value)
Requests that the
awayMessage field be set to the
specified value. |
void |
setLocation(Place value)
Requests that the
location field be set to the
specified value. |
void |
setStatus(byte value)
Requests that the
status field be set to the
specified value. |
String |
who()
Returns a short string identifying this client.
|
void |
willEnterPlace(Place place,
PlaceObject plobj)
Called when this body is about to enter the specified place.
|
addToReceivers, checkAccess, checkAccess, hasAccess, hasAccess, reference, release, removeFromReceivers, setReceivers, setUsername, updateReceiversacquireLock, addListener, addListener, addSubscriber, addToSet, cancelTransaction, changeAttribute, checkPermissions, checkPermissions, commitTransaction, destroy, getAccessController, getAttribute, getLocal, getLocals, getManager, getOid, getSet, inTransaction, isActive, notifyListeners, notifyProxies, postEvent, postMessage, postMessage, releaseLock, removeFromSet, removeListener, removeSubscriber, setAccessController, setAttribute, setDestroyOnLastSubscriberRemoved, setLocal, setManager, setOid, startTransaction, toString, updateSet, which@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String LOCATION
location field.@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String STATUS
status field.@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String AWAY_MESSAGE
awayMessage field.public Place location
public byte status
OccupantInfo.ACTIVE, etc.).public String awayMessage
public int getPlaceOid()
public TokenRing getTokens()
public Name getVisibleName()
ClientObject.username.public OccupantInfo createOccupantInfo(PlaceObject plobj)
public void willEnterPlace(Place place, PlaceObject plobj)
location field.place - the identifying information for the place we are entering.plobj - the distributed object for the place we are entering.public void didLeavePlace(PlaceObject plobj)
location field.plobj - the distributed object for the place we just departed. This might be null if
the place object has been destroyed.public void applyToListeners(SpeakObject.ListenerOp op)
SpeakObjectapplyToListeners in interface SpeakObjectpublic String getChatIdentifier(UserMessage message)
SpeakObjectgetChatIdentifier in interface SpeakObjectpublic ClientObject getClientObject()
ClientObject that represent our driving user's connection. This is
the reverse operation of BodyLocator.forClient and should match it. The default
implementation assumes the client object and the body object are one and the same.
Do not return null here once this object is in the wild.public String who()
ClientObjectwho in class ClientObject@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setLocation(Place value)
location 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.@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setStatus(byte value)
status 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.@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setAwayMessage(String value)
awayMessage 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.Copyright © 2015. All rights reserved.