views:

1119

answers:

7

I am looking for some library that will help me connect to IM networks through a Java program.

My requirement is as follows:

  1. User should be able to login, retrieve friend list, and able to send messages to his friends
  2. Messages should be delivered to offline friends too.

I have done some research about lib-purple. But its not written in Java. Is there any Java wrapper available for the same, so that I can use it with a Java program ?? Or some libpurple plugin that can be used with an XMPP server ?? Or is there any other solution.

Thanks Aneez

PS:

I have tried Openfire XMPP server in conjuction with the IM Gateway Plugin (also tried the Kraken IM Gateway Plugin too). It does not deliver offline messages to MSN and AIM friends (works fine for Yahoo and GTalk).

I have also tried the following libraries and found that they too do not support message delivery to offline friends

  • Java MSN Library
  • jYMSG (for Yahoo)
  • DAIM (for AIM)
+1  A: 

Do you want the offline messages to be stored locally or on a server? I know AIM/ MSN have some kind of server to store offline messages, but i haven't done enough research to know how accessible that is. Another method would be to create (or use an existing) bot that you send the messages to which would handle delivery.

For aim, JAIMBot appears to provide a library that supports this: http://jaimbot.sourceforge.net/

By Googling "msn offline messaging bot" or similar queries, you might be able to find similar libraries/ bots to handle other systems.

Best of luck!

Matt Boehm
My requirement is that once I send the message, say to an offline MSN contact, he should receive it when he next logs in...the message should reach him and not get lost. I believe all this mechanism of message being stored and delivered to an offline contact should be dealt at the service-provider's end, namely MSN and AIM. I say this, because for Yahoo and GTalk, I do nothing but send the message, and they get automatically get deleivered to the offline contacts when they next log in.
aneez
Ok..I forgot to mention that I had tried JAIMBot too. It did not work for me. Apparently there has not been much development activity lately on JAIMBot and the protocol they support seems not to be supported by AIM anymore. This is the error I got when I used JAIMBot:'ERROR: failed to handle aim protocol properly'.
aneez
+1  A: 

The same people who created the openfire XMPP Server created a very good Java Library for communication with Xmmp Servers and through the Jabber transport system to nearly every single instant messaging possibility.

The Library is called Smack and can be found on the homepage of Ignite Realtime.

I worked with different versions of Smack for some projects and build a custom Jabber client with it. The library seems very stable and mature now.

I don't know how outgoing messages to offline users are handled but incoming messages to you while you are offline are stored on the openfire server

Janusz
@JanuszWell to talk to the Openfire XMPP server, I had used smack. Infact Smack can be used to talk directly through GTalk serverBut, smack cannot be used to connect to Legacy IM services as Yahoo, AIM and MSN. I don't think these services provided an XMPP gateway.
aneez
+1  A: 

I've been struggling to make this post. Apparently I am not allowed to add hyperlinks or even URLs.

Google "java aim api"

The first item is Creating AIM-Enabled Applications in Java, Part 1. Good read. You basically need to request a development key. The article will then walk you through setting up Eclipse.

I suspect the other services require a dev key as well.

Cheers!

xeon
+1  A: 

With Java Native Interface you can use libraries from other languages, e.g. c++. So, you could connect to ICQ using ICQ.dll from Miranda IM, etc.

Imaskar
A: 

Check Kraken from the same people who created Openfire... Just Google "Kraken Jabber" and click the first result

Here is a short description: Kraken is a continuation of the Openfire IM Gateway plugin, but in a way that works for any XMPP server. It provides a way for XMPP users to log into, and communicate through, their legacy IM accounts such as AIM, ICQ, MSN, Yahoo, and friends.

Seems to be working fine on a server I set up

A: 

hi I created smack application using tomcat. it is working fine for gtalk, but not for yahoo im. some people advised to do with openfire. then i installed openfire i opened admin panel and added plugins but i am not able to integrate my tomcat application to openfire server so please any one help with your advise

@srikanth Smack is an implementation of the XMPP protocol. GTalk supports XMPP but Yahoo does not. So you cannot use smack to talk to Yahoo. Openfire server is an XMPP server. You can use smack to talk the XMPP server and via XMPP server (using the IM Gateway plugin) you can talk to Yahoo server. Tomcat is a web-server. Your application on Tomcat needs to talk to XMPP server directly. I don't know if what I wrote exactly addresses your problem or helps you out in anyway. May be you can give some info about the application and the exact issue you are facing.
aneez
A: 

i tried smack for gtalk & it seems working fine..but i am trying to make a facebook chat client using the same process.....but its not working..how to connect to facebook using smack? it will worth an example..oh am using java... thanks... dibosh

dibosh