|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.context.Msg
public class Msg
Utility class consisting of static methods that generate various generally
useful messages that can be sent to the client. These messages are sent by
a number of different classes, including, potentially, application-defined
Mod classes, so the methods to construct these messages don't
naturally belong with any particular server abstraction. Hence this bag of
miscellany.
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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).
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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||