|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.context.Mod
org.elkoserver.server.context.mods.Census
public class Census
Mod to enable tracking a context's population. This mod may be attached to a context, user or item.
| Constructor Summary | |
|---|---|
Census()
JSON-driven constructor. |
|
| Method Summary | |
|---|---|
void |
census(User from)
Message handler for the 'census' message. |
JSONLiteral |
encode(EncodeControl control)
Encode this mod for transmission or persistence. |
| Methods inherited from class org.elkoserver.server.context.Mod |
|---|
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@JSONMethod public Census()
| Method Detail |
|---|
public JSONLiteral encode(EncodeControl control)
encode in interface Encodablecontrol - Encode control determining what flavor of encoding
should be done.
@JSONMethod
public void census(User from)
throws MessageHandlerException
recv: { to:REF, op:"census" }
send: { to:REF, op:"census",
occupancy:int }
from - The user requesting the census.
MessageHandlerException - if 'from' is not in the same context as
this mod, or if this mod is attached to a user and 'from' is not that
user.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||