The Google app engine (Gae) supports XMPP in the same way as CLIENT .
Using the XMPP Gae JAVA function, you can:
SEND A MESSAGE
JID jid = new JID("youraccount@jabber.org");
Message msg = new MessageBuilder()
.withRecipientJids(jid)
.withBody("Hello i'm a fancy GAE app, how are you?")
.build();
XMPPService xmpp = XMPPServiceFactory.getXMPPService();
if (xmpp.getPresence(jid).isAvailable()) {
SendResponse status = xmpp.sendMessage(msg);
}
GET MESSAGE
public class XMPPReceiverServlet extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException {
XMPPService xmpp = XMPPServiceFactory.getXMPPService();
Message message = xmpp.parseMessage(req);
JID fromJid = message.getFromJid();
String body = message.getBody();
}
}
, JID yourappid@appspot.com foo@yourappid.appspotchat.com
Google .
, Gae
:
- jabber.org
- Smack
- Smack yourappid@appspot.com
- Gae youraccount@jabber.org.
XMPP (openfire), 1 , Gae.
XMPP , , .