public class MessageEventManager
extends java.lang.Object
| Constructor and Description |
|---|
MessageEventManager(XMPPConnection con)
Creates a new message event manager.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
protected void |
finalize() |
void |
removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
Removes a message event notification listener.
|
void |
removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
Removes a message event request listener.
|
void |
sendCancelledNotification(java.lang.String to,
java.lang.String packetID)
Sends the notification that the receiver of the message has cancelled composing a reply.
|
void |
sendComposingNotification(java.lang.String to,
java.lang.String packetID)
Sends the notification that the receiver of the message is composing a reply
|
void |
sendDeliveredNotification(java.lang.String to,
java.lang.String packetID)
Sends the notification that the message was delivered to the sender of the original message
|
void |
sendDisplayedNotification(java.lang.String to,
java.lang.String packetID)
Sends the notification that the message was displayed to the sender of the original message
|
public MessageEventManager(XMPPConnection con)
con - a XMPPConnection to a XMPP server.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(java.lang.String to,
java.lang.String packetID)
throws SmackException.NotConnectedException
to - the recipient of the notification.packetID - the id of the message to send.SmackException.NotConnectedExceptionpublic void sendDisplayedNotification(java.lang.String to,
java.lang.String packetID)
throws SmackException.NotConnectedException
to - the recipient of the notification.packetID - the id of the message to send.SmackException.NotConnectedExceptionpublic void sendComposingNotification(java.lang.String to,
java.lang.String packetID)
throws SmackException.NotConnectedException
to - the recipient of the notification.packetID - the id of the message to send.SmackException.NotConnectedExceptionpublic void sendCancelledNotification(java.lang.String to,
java.lang.String packetID)
throws SmackException.NotConnectedException
to - the recipient of the notification.packetID - the id of the message to send.SmackException.NotConnectedExceptionpublic void destroy()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable