public class Census extends Mod implements GeneralMod
Constructor and Description |
---|
Census()
JSON-driven constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
census(User from)
Message handler for the 'census' message.
|
JSONLiteral |
encode(EncodeControl control)
Encode this mod for transmission or persistence.
|
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object
@JSONMethod public Census()
public JSONLiteral encode(EncodeControl control)
@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.Copyright © 2017. All rights reserved.