public class Msg extends Object
Mod
classes, so the methods to construct these messages don't
naturally belong with any particular server abstraction. Hence this bag of
miscellany.Modifier and Type | Method and Description |
---|---|
static JSONLiteral |
msgDelete(Referenceable target)
Create a 'delete' message.
|
static JSONLiteral |
msgError(Referenceable target,
String op,
String error)
Create an 'error' message.
|
static JSONLiteral |
msgMake(Referenceable target,
BasicObject obj)
Create a 'make' message with a default creator.
|
static JSONLiteral |
msgMake(Referenceable target,
BasicObject obj,
String sess)
Create a 'make' message with a default creator and explicit session
identifier.
|
static JSONLiteral |
msgMake(Referenceable target,
BasicObject obj,
User maker)
Create a 'make' message.
|
static JSONLiteral |
msgMake(Referenceable target,
BasicObject obj,
User maker,
boolean you,
String sess)
Create a 'make' message.
|
static JSONLiteral |
msgPush(Referenceable target,
Referenceable from,
String url,
String frame,
String features)
Create a 'push' message.
|
static JSONLiteral |
msgSay(Referenceable target,
Referenceable from,
String text)
Create a 'say' message.
|
public static JSONLiteral msgDelete(Referenceable target)
target
- Object the message is being sent to (the object being
deleted).public static JSONLiteral msgError(Referenceable target, String op, String error)
target
- Object the message is being sent to (the object being
informed).op
- Operation to be performed.error
- Contents of the error message.public static JSONLiteral msgMake(Referenceable target, BasicObject obj, User maker, boolean you, String sess)
target
- Object the message is being sent to (the object that is
to be the container of the new object).obj
- The object that is to be created by the client.maker
- The user who is to be represented as the creator of the
object, or null if none is.you
- If true, object being made is its recipient.sess
- The client context session ID, or null if there is none.public static JSONLiteral msgMake(Referenceable target, BasicObject obj, User maker)
target
- Object the message is being sent to (the object that is
to be the container of the new object).obj
- The object that is to be created by the client.maker
- The user who is to be represented as the creator of the
object, or null if none is.public static JSONLiteral msgMake(Referenceable target, BasicObject obj, String sess)
msgMake(target, obj, null, false, sess)
and is provided just for convenience.
target
- Object the message is being sent to (the object that is
to be the container of the new object).obj
- The object that is to be created by the client.sess
- The client context session ID, or null if there is none.public static JSONLiteral msgMake(Referenceable target, BasicObject obj)
msgMake(target, obj, null, false, null)
and is provided just for convenience.
target
- Object the message is being sent to (the object that is
to be the container of the new object).obj
- The object that is to be created by the client.public static JSONLiteral msgPush(Referenceable target, Referenceable from, String url, String frame, String features)
target
- Object the message is being sent to (normally this will
be a user or context).from
- Object the message is to be alleged to be from, or
null if not relevant. This normally indicates the user who is doing
the pushing.url
- The URL being pushed.frame
- Name of a frame to push the URL into, or null if not
relevant.features
- Features string to associate with the URL, or null if
not relevant.public static JSONLiteral msgSay(Referenceable target, Referenceable from, String text)
target
- Object the message is being sent to (normally this will
be a user or context).from
- Object the message is to be alleged to be from, or null if
not relevant. This normally indicates the user who is speaking.text
- The text to be said.Copyright © 2017. All rights reserved.