Download Reference Manual

Transcript
manual_10 09.07.2003 17:20 Uhr Seite 112
MessagingManager
Handles the delivery of messages. The MessagingManager is intended for messages
aimed at targets outside the current group. For messages that you want to send to
clients within the current group use sentToClients in Group or sendToClient in User
instead. The MessagingManager is similar to the ActionScript Messenger object in the
Client API.
Method Summary
void publish (Message msg)
void sendToAll (Message msg)
void sendToGroup (Message msg, String groupName)
void sendToUser (Message msg, String recipient)
void subscribe (User user, String subject)
void unsubscribe (User user, String subject)
void unsubscribeAll (User user)
publish
void publish (Message msg)
Sends a message to all users that have subscribed to the subject of this message. It will
be passed to the messageToUser method in org.omus.ext.GroupExtension for all the
recipients and then forwarded to the clients and received in the onMessage event handler in the client side Messenger object.
sendToAll
void sendToAll (Message msg)
Sends a message to all users who are currently logged into the server. It will be passed
to the messageToUser method in org.omus.ext.GroupExtension for all the recipients
and then forwarded to the clients and received in the onMessage event handler in the
client side Messenger object.
sendToGroup
void sendToGroup (Message msg, String groupName)
Sends a message to all the members of a particular group. It will be passed to the
messageToGroup method in org.omus.ext.GroupExtension in the target group and
then forwarded to the client and received in the onMessage event handler in the client
side Messenger object.
112
MessagingManager