|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smackx.MessageEventManager
public class MessageEventManager
Manages message events requests and notifications. A MessageEventManager provides a high level access to request for notifications and send event notifications. It also provides an easy way to hook up custom logic when requests or notifications are received.
Constructor Summary | |
---|---|
MessageEventManager(XMPPConnection con)
Creates a new message event manager. |
Method Summary | |
---|---|
void |
addMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
Adds a message event notification listener. |
void |
addMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
Adds a message event request listener. |
static void |
addNotificationsRequests(Message message,
boolean offline,
boolean delivered,
boolean displayed,
boolean composing)
Adds event notification requests to a message. |
void |
destroy()
|
void |
finalize()
|
void |
removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
Removes a message event notification listener. |
void |
removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
Removes a message event request listener. |
void |
sendCancelledNotification(String to,
String packetID)
Sends the notification that the receiver of the message has cancelled composing a reply. |
void |
sendComposingNotification(String to,
String packetID)
Sends the notification that the receiver of the message is composing a reply |
void |
sendDeliveredNotification(String to,
String packetID)
Sends the notification that the message was delivered to the sender of the original message |
void |
sendDisplayedNotification(String to,
String packetID)
Sends the notification that the message was displayed to the sender of the original message |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageEventManager(XMPPConnection con)
con
- an XMPPConnection.Method Detail |
---|
public static void addNotificationsRequests(Message message, boolean offline, boolean delivered, boolean displayed, boolean composing)
message
- the message to add the requested notifications.offline
- specifies if the offline event is requested.delivered
- specifies if the delivered event is requested.displayed
- specifies if the displayed event is requested.composing
- specifies if the composing event is requested.public void addMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
messageEventRequestListener
- a message event request listener.public void removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
messageEventRequestListener
- a message event request listener.public void addMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
messageEventNotificationListener
- a message event notification listener.public void removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
messageEventNotificationListener
- a message event notification listener.public void sendDeliveredNotification(String to, String packetID)
to
- the recipient of the notification.packetID
- the id of the message to send.public void sendDisplayedNotification(String to, String packetID)
to
- the recipient of the notification.packetID
- the id of the message to send.public void sendComposingNotification(String to, String packetID)
to
- the recipient of the notification.packetID
- the id of the message to send.public void sendCancelledNotification(String to, String packetID)
to
- the recipient of the notification.packetID
- the id of the message to send.public void destroy()
public void finalize()
finalize
in class Object
|
Smack | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |