public class ChatHistory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ChatHistory.Entry
Recorded parcel of chat for historical purposes, maintained by
record(ChatChannel, String, UserMessage, Name[]),
get(Name), and clear(Name). |
| Modifier and Type | Field and Description |
|---|---|
static long |
HISTORY_EXPIRATION
The amount of time before chat history becomes...
|
| Constructor and Description |
|---|
ChatHistory()
Creates a new chat history, automatically registering a message observer with
SpeakUtil. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(Name username)
Clears the chat history for the specified user.
|
List<ChatHistory.Entry> |
get(Name username)
Returns a list of
ChatHistory.Entry objects, one for each message to which this user has been
privy in the recent past. |
void |
hold(Name username)
Causes the chat history for the given user to be held briefly after the
clear(com.threerings.util.Name)
call so that session observers can grab it. |
void |
record(ChatChannel channel,
String source,
UserMessage msg,
Name... usernames)
Records the specified channel and message to the specified users' chat histories.
|
public static final long HISTORY_EXPIRATION
public ChatHistory()
SpeakUtil.public List<ChatHistory.Entry> get(Name username)
ChatHistory.Entry objects, one for each message to which this user has been
privy in the recent past. If the given name implements KeepNoHistory, null is
returned.public void clear(Name username)
public void record(ChatChannel channel, String source, UserMessage msg, Name... usernames)
ChatMessage.timestamp is not already filled in, it will be.public void hold(Name username)
clear(com.threerings.util.Name)
call so that session observers can grab it.Copyright © 2015. All rights reserved.