通过 Java 程序连接到即时消息 (IM) 服务(例如 Yahoo、MSN、AIM)的库

发布于 2024-07-22 16:55:59 字数 573 浏览 6 评论 0原文

我正在寻找一些库,可以帮助我通过 Java 程序连接到 IM 网络。

我的要求如下:

  1. 用户应该能够登录, 检索好友列表,并能够 向他的朋友发送消息
  2. 消息应发送至 线下的朋友也一样。

我对 lib-purple 做了一些研究。 但它不是用 Java 编写的。 有没有可用的 Java 包装器,以便我可以将它与 Java 程序一起使用? 或者一些可以与 XMPP 服务器一起使用的 libpurple 插件? 或者有没有其他解决办法。

谢谢 Aneez

PS:

我已经尝试过将 Openfire XMPP 服务器与 IM 网关插件结合使用(也尝试过 Kraken IM 网关插件)。 它不会向 MSN 和 AIM 好友发送离线消息(适用于 Yahoo 和 GTalk)。

我还尝试了以下库,发现它们也不支持向离线好友传递消息

  • Java MSN 库
  • jYMSG(适用于 Yahoo)
  • DAIM(适用于 AIM)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

旧时光的容颜 2024-07-29 16:55:59

您希望离线消息存储在本地还是服务器上? 我知道 AIM/MSN 有某种服务器来存储离线消息,但我还没有做足够的研究来了解它的可访问性。 另一种方法是创建(或使用现有的)机器人,您将消息发送到该机器人来处理传递。

为此,JAIMBot 似乎提供了一个支持此功能的库: http://jaimbot.sourceforge.net/

通过谷歌搜索“msn 离线消息机器人”或类似查询,您也许能够找到类似的库/机器人来处理其他系统。

祝你好运!

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!

爱你是孤单的心事 2024-07-29 16:55:59

创建 openfire XMPP 服务器的同一个人创建了一个非常好的 Java 库,用于与 Xmmp 服务器进行通信,并通过 Jabber 传输系统实现几乎所有即时消息传递的可能性。

该库名为 Smack,可以在 Ignite Realtime 的主页上找到。

我在一些项目中使用了不同版本的 Smack,并用它构建了一个自定义的 Jabber 客户端。 现在这个库看起来非常稳定和成熟。

我不知道如何处理发送给离线用户的消息,但是当您离线时发送给您的传入消息存储在 openfire 服务器上

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

这样的小城市 2024-07-29 16:55:59

我一直在努力写这篇文章。 显然我不允许添加超链接甚至 URL。

Google“java goal api”

第一项是用 Java 创建支持 AIM 的应用程序,第 1 部分。读得好。 您基本上需要请求开发密钥。 然后本文将引导您完成 Eclipse 的设置。

我怀疑其他服务也需要开发密钥。

干杯!

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!

临风闻羌笛 2024-07-29 16:55:59

通过 Java 本机接口,您可以使用其他语言(例如 c++)的库。
因此,您可以使用 Miranda IM 等的 ICQ.dll 连接到 ICQ。

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.

等待我真够勒 2024-07-29 16:55:59

检查 Kraken 来自创建 Openfire 的同一个人...
只需谷歌“Kraken Jabber”并单击第一个结果

以下是简短的描述:
Kraken 是 Openfire IM 网关插件的延续,但在某种程度上适用于任何 XMPP 服务器。 它为 XMPP 用户提供了一种登录并通过其旧版 IM 帐户(例如 AIM、ICQ、MSN、Yahoo 和朋友)进行通信的方法。

似乎在我设置的服务器上运行良好

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

七度光 2024-07-29 16:55:59

您可以使用 Kik API 连接 Kik Messenger 移动 IM 服务。 它允许您的 Android 或 iPhone 应用程序使用 Kik 自己的传输和基础设施向其他移动应用程序用户发送丰富的内容和文件。 在更简单的场景中,集成速度也非常快 - 只需 5 行代码。 API 网站或博客上有更多信息:http://www.kik.com/dev 和 < a href="http://apiblog.kik.com" rel="nofollow">http://apiblog.kik.com

免责声明:我是 Kik API 背后的人之一:)

You can connect with Kik Messenger mobile IM service using Kik API. It lets your Android or iPhone apps to use Kik's own transport and infrastructure to send rich content and files to other mobile app users. It is also very quick to integrate - 5 lines of code, in simpler scenarios. There's more info on the API website or blog: http://www.kik.com/dev and http://apiblog.kik.com

Disclaimer: I'm one of the guys behind Kik API :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文