com.threerings.crowd.chat.client
Interface ChatService

All Superinterfaces:
InvocationService<ClientObject>
All Known Implementing Classes:
ChatMarshaller

public interface ChatService
extends InvocationService<ClientObject>

The chat services provide a mechanism by which the client can broadcast chat messages to all clients that are subscribed to a particular place object or directly to a particular client. These services should not be used directly, but instead should be accessed via the ChatDirector.


Nested Class Summary
static interface ChatService.TellListener
          Used to communicate the response to a tell(com.threerings.util.Name, java.lang.String, com.threerings.crowd.chat.client.ChatService.TellListener) request.
 
Nested classes/interfaces inherited from interface com.threerings.presents.client.InvocationService
InvocationService.ConfirmListener, InvocationService.InvocationListener, InvocationService.ResultListener
 
Method Summary
 void away(String message)
          Sets this client's away message.
 void broadcast(String message, InvocationService.InvocationListener listener)
          Requests that a message be broadcast to all users in the system.
 void tell(Name target, String message, ChatService.TellListener listener)
          Requests that a tell message be delivered to the user with username equal to target.
 

Method Detail

tell

void tell(Name target,
          String message,
          ChatService.TellListener listener)
Requests that a tell message be delivered to the user with username equal to target.

Parameters:
target - the username of the user to which the tell message should be delivered.
message - the contents of the message.
listener - the reference that will receive the tell response.

broadcast

void broadcast(String message,
               InvocationService.InvocationListener listener)
Requests that a message be broadcast to all users in the system.

Parameters:
message - the contents of the message.
listener - the reference that will receive a failure response.

away

void away(String message)
Sets this client's away message. If the message is null or the empty string, the away message will be cleared.