public class ChatProvider extends Object implements InvocationProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
ChatProvider.ChatForwarder
Used to forward certain types of chat messages between servers in a multi-server setup.
|
static interface |
ChatProvider.TellAutoResponder
Interface to allow an auto response to a tell message.
|
| Constructor and Description |
|---|
ChatProvider(InvocationManager invmgr)
Creates and registers this chat provider.
|
| Modifier and Type | Method and Description |
|---|---|
void |
away(ClientObject caller,
String message)
Processes a
ChatService.away(java.lang.String) request. |
void |
broadcast(ClientObject caller,
String message,
InvocationService.InvocationListener listener)
|
void |
broadcast(Name from,
byte levelOrMode,
String bundle,
String msg,
boolean forward)
Broadcast with support for a customizable level or mode.
|
void |
broadcast(Name from,
String bundle,
String msg,
boolean attention,
boolean forward)
Broadcasts the specified message to all place objects in the system.
|
void |
deliverTell(BodyObject target,
UserMessage message)
Delivers a tell notification to the specified target player.
|
void |
deliverTell(UserMessage message,
Name target,
ChatService.TellListener listener)
Delivers a tell message to the specified target and notifies the supplied listener of the
result.
|
void |
setAlternateBroadcastObject(DObject object)
Set an object to which all broadcasts should be sent, rather than iterating over the place
objects and sending to each of them.
|
void |
setChatForwarder(ChatProvider.ChatForwarder forwarder)
Configures the chat forwarder.
|
void |
setTellAutoResponder(ChatProvider.TellAutoResponder autoRespond)
Set the auto tell responder for the chat provider.
|
void |
tell(ClientObject caller,
Name target,
String message,
ChatService.TellListener listener)
|
@Inject public ChatProvider(InvocationManager invmgr)
public void setAlternateBroadcastObject(DObject object)
object - an object to send all broadcasts, or null to send to each place object
instead.public void setTellAutoResponder(ChatProvider.TellAutoResponder autoRespond)
public void setChatForwarder(ChatProvider.ChatForwarder forwarder)
public void tell(ClientObject caller, Name target, String message, ChatService.TellListener listener) throws InvocationException
ChatService.tell(com.threerings.util.Name, java.lang.String, com.threerings.crowd.chat.client.ChatService.TellListener) request.InvocationExceptionpublic void broadcast(ClientObject caller, String message, InvocationService.InvocationListener listener) throws InvocationException
ChatService.broadcast(java.lang.String, com.threerings.presents.client.InvocationService.InvocationListener) request.InvocationExceptionpublic void away(ClientObject caller, String message)
ChatService.away(java.lang.String) request.public void broadcast(Name from, String bundle, String msg, boolean attention, boolean forward)
from - the user the broadcast is from, or null to send the message as a system message.bundle - the bundle, or null if the message needs no translation.msg - the content of the message to broadcast.attention - if true, the message is sent as ATTENTION level, otherwise as INFO. Ignored
if from is non-null.forward - if true, forward this broadcast on to any registered chat forwarder, if
false, deliver it only locally on this server.public void broadcast(Name from, byte levelOrMode, String bundle, String msg, boolean forward)
levelOrMode - if from is null, it's an attentionLevel, else it's a mode code.public void deliverTell(UserMessage message, Name target, ChatService.TellListener listener) throws InvocationException
InvocationExceptionpublic void deliverTell(BodyObject target, UserMessage message)
Copyright © 2015. All rights reserved.