public class MessageEventManager extends 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(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
|
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(String to, String packetID) throws SmackException.NotConnectedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
public void sendDisplayedNotification(String to, String packetID) throws SmackException.NotConnectedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
public void sendComposingNotification(String to, String packetID) throws SmackException.NotConnectedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
public void sendCancelledNotification(String to, String packetID) throws SmackException.NotConnectedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
public void destroy()