|
|||||||||
| 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.presents.data.ClientObject
public class ClientObject
A distributed object to which only the client subscribes. Used to deliver messages solely to a particular client as well as to publish client-specific data.
| Field Summary | |
|---|---|
protected PermissionPolicy |
_permPolicy
Handles our fine-grained permissions. |
protected int |
_references
Used to reference count resolved client objects. |
static String |
CLOBJ_CHANGED
The name of a message event delivered to the client when they switch usernames (and therefore user objects). |
DSet<InvocationReceiver.Registration> |
receivers
Used to publish all invocation service receivers registered on this client. |
static String |
RECEIVERS
The field name of the receivers field. |
Name |
username
This client's authentication username. |
static String |
USERNAME
The field name of the username field. |
| 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 | |
|---|---|
ClientObject()
|
|
| Method Summary | |
|---|---|
void |
addToReceivers(InvocationReceiver.Registration elem)
Requests that the specified entry be added to the receivers set. |
String |
checkAccess(Permission perm)
A version of checkAccess(Permission,Object) that provides no context. |
String |
checkAccess(Permission perm,
Object context)
Checks whether or not this client has the specified permission. |
boolean |
hasAccess(Permission perm)
Convenience wrapper around checkAccess(Permission) that simply returns a boolean
indicating whether or not this client has the permission rather than an explanation. |
boolean |
hasAccess(Permission perm,
Object context)
Convenience wrapper around checkAccess(Permission,Object) that simply returns a
boolean indicating whether or not this client has the permission rather than an explanation. |
void |
reference()
Used for reference counting client objects, adds a reference to this object. |
boolean |
release()
Used for reference counting client objects, releases a reference to this object. |
void |
removeFromReceivers(Comparable<?> key)
Requests that the entry matching the supplied key be removed from the receivers set. |
void |
setPermissionPolicy(PermissionPolicy policy)
Configures this client with a permissions policy. |
void |
setReceivers(DSet<InvocationReceiver.Registration> value)
Requests that the receivers field be set to the
specified value. |
void |
setUsername(Name value)
Requests that the username field be set to the
specified value. |
void |
updateReceivers(InvocationReceiver.Registration elem)
Requests that the specified entry be updated in the receivers set. |
String |
who()
Returns a short string identifying this client. |
| 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 USERNAME
username field.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public static final String RECEIVERS
receivers field.
public static final String CLOBJ_CHANGED
public Name username
public DSet<InvocationReceiver.Registration> receivers
protected PermissionPolicy _permPolicy
protected transient int _references
| Constructor Detail |
|---|
public ClientObject()
| Method Detail |
|---|
public void setPermissionPolicy(PermissionPolicy policy)
public String who()
public String checkAccess(Permission perm,
Object context)
PermissionPolicypublic String checkAccess(Permission perm)
checkAccess(Permission,Object) that provides no context.
public boolean hasAccess(Permission perm,
Object context)
checkAccess(Permission,Object) that simply returns a
boolean indicating whether or not this client has the permission rather than an explanation.
public boolean hasAccess(Permission perm)
checkAccess(Permission) that simply returns a boolean
indicating whether or not this client has the permission rather than an explanation.
public void reference()
public boolean release()
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setUsername(Name value)
username 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 addToReceivers(InvocationReceiver.Registration elem)
receivers set. The set will not change until the event is
actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void removeFromReceivers(Comparable<?> key)
receivers set. The set will not change until the
event is actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void updateReceivers(InvocationReceiver.Registration elem)
receivers set. The set will not change until the event is
actually propagated through the system.
@Generated(value="com.threerings.presents.tools.GenDObjectTask") public void setReceivers(DSet<InvocationReceiver.Registration> value)
receivers 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||