public class MuteDirector extends BasicDirector implements ChatFilter
| Modifier and Type | Class and Description |
|---|---|
static interface |
MuteDirector.MuteObserver
An interface that can be registered with the MuteDirector to
receive notifications to the mutelist.
|
| Constructor and Description |
|---|
MuteDirector(CrowdContext ctx)
Should be instantiated after the ChatDirector.
|
MuteDirector(CrowdContext ctx,
Name[] list)
Set up the mute director with the specified list of initial mutees.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMuteObserver(MuteDirector.MuteObserver obs)
Add the specified mutelist observer.
|
String |
filter(String msg,
Name otherUser,
boolean outgoing)
Filter a chat message.
|
Name[] |
getMuted() |
boolean |
isMuted(Name username)
Check to see if the specified user is muted.
|
void |
removeMuteObserver(MuteDirector.MuteObserver obs)
Remove the specified mutelist observer.
|
void |
setChatDirector(ChatDirector chatdir)
Set the required ChatDirector.
|
void |
setMuted(Name username,
boolean mute)
Mute or unmute the specified user.
|
void |
shutdown()
Called to shut down the mute director.
|
clientDidLogoff, clientDidLogon, clientObjectDidChange, clientWillLogon, isAvailableInStandalone, setAvailableInStandalonepublic MuteDirector(CrowdContext ctx)
public MuteDirector(CrowdContext ctx, Name[] list)
public void shutdown()
public void setChatDirector(ChatDirector chatdir)
public void addMuteObserver(MuteDirector.MuteObserver obs)
public void removeMuteObserver(MuteDirector.MuteObserver obs)
public boolean isMuted(Name username)
public void setMuted(Name username, boolean mute)
public Name[] getMuted()
public String filter(String msg, Name otherUser, boolean outgoing)
ChatFilterfilter in interface ChatFiltermsg - the message text to be filtered.otherUser - an optional argument that represents the target or the speaker, depending
on 'outgoing', and can be considered in filtering if it is provided.outgoing - true if the message is going out to the server.Copyright © 2015. All rights reserved.