public interface XMPPService
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Presence> |
getPresence(java.lang.Iterable<JID> jabberIds)
Given a JID, look up the user's status and return it.
|
java.util.List<Presence> |
getPresence(java.lang.Iterable<JID> jabberIds,
JID fromJid)
Given a JID, look up the user's status and return it.
|
Presence |
getPresence(JID jabberId)
Given a JID, look up the user's status and return it.
|
Presence |
getPresence(JID jabberId,
JID fromJid)
Given a JID, look up the user's status and return it.
|
Message |
parseMessage(HttpServletRequest request)
Parse the incoming message provided in
request. |
Presence |
parsePresence(HttpServletRequest request)
Parse the incoming presence notification provided in
request. |
Subscription |
parseSubscription(HttpServletRequest request)
Parse the incoming subscription notification provided in
request. |
void |
sendInvitation(JID jabberId)
Given a JID, sends a chat invitation.
|
void |
sendInvitation(JID jabberId,
JID fromJid)
Given a JID, sends a chat invitation.
|
SendResponse |
sendMessage(Message message)
Send provided message to specified JIDs.
|
void |
sendPresence(JID jabberId,
PresenceType type,
PresenceShow show,
java.lang.String status)
Given a JID, type and optional show and status value, sends
a presence packet.
|
void |
sendPresence(JID jabberId,
PresenceType type,
PresenceShow show,
java.lang.String status,
JID fromJid)
Given a JID, type and optional show and status value, sends
a presence packet.
|
Presence getPresence(JID jabberId)
jabberId - JID of the user whose presence should be fetched.java.lang.IllegalArgumentException - if the id is not validPresence getPresence(JID jabberId, JID fromJid)
jabberId - JID of the user whose presence should be fetched.fromJid - JID of the chat bot. Can be null.java.lang.IllegalArgumentException - if the id is not validjava.util.List<Presence> getPresence(java.lang.Iterable<JID> jabberIds)
jabberIds - A collection of JIDs for users whose presence should be fetched.java.util.List<Presence> getPresence(java.lang.Iterable<JID> jabberIds, JID fromJid)
jabberIds - A collection of JIDs for users whose presence should be fetched.fromJid - JID of the chat bot. Can be null.void sendPresence(JID jabberId, PresenceType type, PresenceShow show, java.lang.String status)
jabberId - JID of the user to send presence to.type - Type of presence. Can be null (available).show - Value for show element. Can be null.status - String for status element. Can be null.java.lang.IllegalArgumentException - If the one or more of the parameters
are not valid.void sendPresence(JID jabberId, PresenceType type, PresenceShow show, java.lang.String status, JID fromJid)
jabberId - JID of the user to send presence to.type - Type of presence. Can be null (available).show - Value for show element. Can be null.status - String for status element. Can be null.fromJid - JID of the chat bot. Can be null.java.lang.IllegalArgumentException - If the one or more of the parameters
are not valid.void sendInvitation(JID jabberId)
jabberId - JID of the user to invite.java.lang.IllegalArgumentException - if the id is not validvoid sendInvitation(JID jabberId, JID fromJid)
fromJid - JID of the chat bot. Can be null.java.lang.IllegalArgumentException - if the id is not validSendResponse sendMessage(Message message)
message - Message to send.java.lang.IllegalArgumentException - if the message or ids are not validMessage parseMessage(HttpServletRequest request) throws java.io.IOException
request. This
method should only be called from within an XMPP webhook.java.io.IOExceptionPresence parsePresence(HttpServletRequest request) throws java.io.IOException
request. This
method should only be called from within an XMPP webhook.java.io.IOExceptionSubscription parseSubscription(HttpServletRequest request) throws java.io.IOException
request.
This method should only be called from within an XMPP webhook.java.io.IOException