public class SpeakUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SpeakUtil.MessageObserver
An interface used to notify external systems whenever a chat message is spoken by one user
and heard by another.
|
| Constructor and Description |
|---|
SpeakUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
registerMessageObserver(SpeakUtil.MessageObserver obs)
Registers a
SpeakUtil.MessageObserver to be notified whenever a user-originated chat message
is heard by another user. |
static void |
removeMessageObserver(SpeakUtil.MessageObserver obs)
Removes a registration made previously with
registerMessageObserver(com.threerings.crowd.chat.server.SpeakUtil.MessageObserver). |
static void |
sendAttention(DObject speakObj,
String bundle,
String message)
Sends a system ATTENTION message notification to the specified object with the supplied
message content.
|
static void |
sendFeedback(DObject speakObj,
String bundle,
String message)
Sends a system FEEDBACK message notification to the specified object with the supplied
message content.
|
static void |
sendInfo(DObject speakObj,
String bundle,
String message)
Sends a system INFO message notification to the specified object with the supplied message
content.
|
static void |
sendMessage(DObject speakObj,
ChatMessage msg)
Send the specified message on the specified object.
|
static void |
sendSpeak(DObject speakObj,
Name speaker,
String bundle,
String message)
Sends a speak notification to the specified place object originating with the specified
speaker (the speaker optionally being a server entity that wishes to fake a "speak" message)
and with the supplied message content.
|
static void |
sendSpeak(DObject speakObj,
Name speaker,
String bundle,
String message,
byte mode)
Sends a speak notification to the specified place object originating with the specified
speaker (the speaker optionally being a server entity that wishes to fake a "speak" message)
and with the supplied message content.
|
public static void registerMessageObserver(SpeakUtil.MessageObserver obs)
SpeakUtil.MessageObserver to be notified whenever a user-originated chat message
is heard by another user.public static void removeMessageObserver(SpeakUtil.MessageObserver obs)
registerMessageObserver(com.threerings.crowd.chat.server.SpeakUtil.MessageObserver).public static void sendSpeak(DObject speakObj, Name speaker, String bundle, String message)
speakObj - the object on which to generate the speak message.speaker - the username of the user that generated the message (or some special speaker
name for server messages).bundle - null when the message originates from a real human, the bundle identifier that
will be used by the client to translate the message text when the message originates from a
server entity "faking" a chat message.message - the text of the speak message.public static void sendSpeak(DObject speakObj, Name speaker, String bundle, String message, byte mode)
speakObj - the object on which to generate the speak message.speaker - the username of the user that generated the message (or some special speaker
name for server messages).bundle - null when the message originates from a real human, the bundle identifier that
will be used by the client to translate the message text when the message originates from a
server entity "faking" a chat message.message - the text of the speak message.mode - the mode of the message, see ChatCodes.DEFAULT_MODE.public static void sendInfo(DObject speakObj, String bundle, String message)
speakObj - the object on which to deliver the message.bundle - the name of the localization bundle that should be used to translate this
system message prior to displaying it to the client.message - the text of the message.public static void sendFeedback(DObject speakObj, String bundle, String message)
speakObj - the object on which to deliver the message.bundle - the name of the localization bundle that should be used to translate this
system message prior to displaying it to the client.message - the text of the message.public static void sendAttention(DObject speakObj, String bundle, String message)
speakObj - the object on which to deliver the message.bundle - the name of the localization bundle that should be used to translate this
system message prior to displaying it to the client.message - the text of the message.public static void sendMessage(DObject speakObj, ChatMessage msg)
Copyright © 2015. All rights reserved.