public class Definer extends Cap implements ItemMod, UserMod
Constructor and Description |
---|
Definer(JSONObject raw)
JSON-driven constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
define(User from,
OptString into,
OptString ref,
BasicObject obj)
Message handler for a 'define' message.
|
JSONLiteral |
encode(EncodeControl control)
Encode this mod for transmission or persistence.
|
delete, encodeDefaultParameters, ensureValid, isExpired, objectIsComplete, setlabel, spawn, transfer
attachTo, clone, context, ensureHolding, ensureInContext, ensureReachable, ensureSameContext, ensureSameUser, holder, isEphemeral, markAsChanged, markAsEphemeral, object
@JSONMethod public Definer(JSONObject raw) throws JSONDecodingException
JSONDecodingException
@JSONMethod(value={"into","ref","obj"}) public void define(User from, OptString into, OptString ref, BasicObject obj) throws MessageHandlerException
recv: { to:REF, op:"define", into:optREF,
ref:optREF, obj:OBJDESC }
send: { to:REF, op:"define", ref:REF }
into
- Container into which the new object should be placed
(optional, defaults to no container).ref
- Reference string for the new object (optional, defaults to
an automatically generated ref).obj
- JSON descriptor for the object itselfMessageHandlerException
- if 'from' is not the holder of this
definer capability, or if an explicit ID is given but an object of
that ID is loaded, or if a container is given and that container
object is loaded, or if the object descriptor is not a valid context,
item or user descriptor.public JSONLiteral encode(EncodeControl control)
Copyright © 2017. All rights reserved.