Showing results for 
Search instead for 
Did you mean: 

Can I create a Java application that interfaces to Jabber?

Cisco Employee
Cisco Employee

I want to have a non-human sign into Jabber and monitor for when anyone talks to it. Can this be done with Java. Since there will not be a UI for this non-human interface I don't see Javascript as a possible foundation for the solution.

Helloworld Sample code available?

5 Replies 5

Cisco Employee
Cisco Employee

Do you mean you would like to monitor a Jabber specific client or when the server passes a message on to the client you want to know about it?

If you are using a CUP server you can set up a separate database that the CUP server points to, which records all of the Jabber messaging that crosses that server.  I would imagine you could create an application that monitors the database and alerts you when a particular Jabber client is be messaged.  I have not put something like that into practice, but it seems prety doable.

If you are talking about making your own Jabber client that alerts you when it is being communicated to, then this is also very doable.  You would basically make a java application that uses the XMPP protocol (RFC 3920 - Extensible Messaging and Presence Protocol (XMPP): Core) to communicate to the CUP server or really any XMPP server and then you would have it alert you when it is being communicated to.  I am working on an XMPP client in the Python language that uses the protocol and I was planning to move it to the Java language, which I might be able to do a hello world example of that in Java but I probably won't be able to get to it until next week.

Ideal Networks

Old thread but in case it helps anyone else, have a look at the "Smack" Java XMPP library, which I've used to achieve something very similar. To listen for incoming messages in particular, check out

@Ideal Networks - The smack XMPP was used to connect to BOSH interface or direct XMPP interface of CUPS. I am having a problem with SASL authentication which works with the HTTP but not with XMPP port.

Cisco Employee
Cisco Employee

Pls check the CUPS/IM&P server settings under System/Security/Settings

On this page, secure (HTTPS) vs. non-secure (HTTP) mode can be toggled for the XMPP and Web (BOSH) services.  The client will need to connect securely (or not) depending on the setting for the interface it uses.

Cisco Employee
Cisco Employee

Cisco doesn't offer a Jabber library for Java.  As Ideal Networks said, the Smack library is one possible choice, although I get the impression it's for high-powered apps rather than a simple one-task app you're trying to create.  You might also want to take a look at Babbler - an XMPP library for Java which is a work in progress, but might do the job. 

There are others.  Here's a list of libraries available in various languages.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers