侦听XMPP中的新用户请求

时间:2012-10-18 10:07:40

标签: java xmpp messaging smack asmack

我正在尝试使用xmpp和smack设置聊天消息。

我可以连接,登录

m_connection.connect();
SASLAuthentication.supportSASLMechanism("PLAIN", 0);
m_connection.login(userName, password);

此外,我可以创建新用户作为管理员。

AccountManager ac = m_connection.getAccountManager();
ac.createAccount(user, password);

我的周期中唯一缺少的是客户想要第一次注册。管理员用户如何获得创建新用户的通知/请求。有没有我可能错过的听众?

谢谢!

1 个答案:

答案 0 :(得分:2)

您只需向他们提供注册表单,然后像您在示例中所做的那样使用createAccount方法。