public final class MessageEventManager extends 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.
|
static MessageEventManager |
getInstanceFor(XMPPConnection connection) |
void |
removeMessageEventNotificationListener(MessageEventNotificationListener messageEventNotificationListener)
Removes a message event notification listener.
|
void |
removeMessageEventRequestListener(MessageEventRequestListener messageEventRequestListener)
Removes a message event request listener.
|
void |
sendCancelledNotification(Jid to,
String packetID)
Sends the notification that the receiver of the message has cancelled composing a reply.
|
void |
sendComposingNotification(Jid to,
String packetID)
Sends the notification that the receiver of the message is composing a reply.
|
void |
sendDeliveredNotification(Jid to,
String packetID)
Sends the notification that the message was delivered to the sender of the original message.
|
void |
sendDisplayedNotification(Jid to,
String packetID)
Sends the notification that the message was displayed to the sender of the original message.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public static MessageEventManager getInstanceFor(XMPPConnection connection)
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(Jid to, String packetID) throws SmackException.NotConnectedException, InterruptedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
InterruptedException
public void sendDisplayedNotification(Jid to, String packetID) throws SmackException.NotConnectedException, InterruptedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
InterruptedException
public void sendComposingNotification(Jid to, String packetID) throws SmackException.NotConnectedException, InterruptedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
InterruptedException
public void sendCancelledNotification(Jid to, String packetID) throws SmackException.NotConnectedException, InterruptedException
to
- the recipient of the notification.packetID
- the id of the message to send.SmackException.NotConnectedException
InterruptedException