What XMPP framework for Java to choose

2019-04-15 11:28发布

问题:

I'm currently considering usage of XMPP as an additional protocol for an existing chat server. Since the chat server is implemented in Java, I'm looking for a java framework that implements XMPP.

It must support XMPP over HTTP.
It would be nice, but not mandatory, if the same framework could be reused for the web ui, to create a comet like web client.

Thanks in advance!

Update: A clarification: I want to expose the existing chat server using XMPP over HTTP, and I'm looking for a framework to do that.
In addition, I'm looking for a framework/component that provides a web client. Just like GTalk in GMail's web page.

回答1:

Use an existing server like OpenFire or Tigase, then use their extensibility mechanisms to add a new component. You access the server over plain XMPP or BOSH as per normal, then route to your new component using a different domain name.



回答2:

Let's try a completely different answer, in case you're asking a different question. If you have an existing XMPP server that doesn't implement BOSH, and want to add BOSH support to it, you typically use Punjab (whose link isn't working at the moment) or rhb. Then you use a JavaScript implementation of the client side of BOSH, such as strophe.js to build whatever client you want.

Regardless, you should probably read "Professional XMPP Programming with JavaScript and jQuery", which will explain how all of the pieces fit together.



回答3:

you can look at Smack, it is a very easy to learn framework to work with.