Growl 的 Java API

发布于 2024-12-14 18:57:59 字数 233 浏览 3 评论 0原文

Growl 有一个网络协议来接收来自其他应用程序的通知。

似乎 jitsi 项目(又名 SIP Communicator)使用了这些类型的通知,但引用了一个名为 Growl4j 的库,该库可能是在 Google Summer of Code 2009 期间开发的。

但是,这个库似乎不再存在了?在谷歌上发现了一些与growl4j.dev.java.net相关的痕迹,但该网站已经不存在了。

知道为什么吗?

Growl has a network protocol to received notifications from other apps.

It seems that the jitsi project (aka SIP Communicator) uses these types of notfication but refers to a library called growl4j probably developed during Google Summer of Code 2009.

However, this library does not seem to exist anymore? Some traces found on google related to growl4j.dev.java.net, but the site does not exist anymore.

Any idea why?

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

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

发布评论

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

评论(2

隔纱相望 2024-12-21 18:58:00

以下是几个 Growl Java 库的链接:

http://code.google.com/p/jgntp /

http://sourceforge.net/projects/libgrowl/

这两个都是基于在新的 GNTP 协议上,所以他们使用最新版本的 Growl(来自 Mac App Store 的 1.3+)。

Here are links to a couple of Growl Java libraries:

http://code.google.com/p/jgntp/

http://sourceforge.net/projects/libgrowl/

Both of these are based on the new GNTP protocol so they work with the newest versions of Growl (1.3+ from the Mac App Store).

满地尘埃落定 2024-12-21 18:58:00

同意布莱恩的观点,
我认为这两个引用的库是唯一可以与最新的咆哮版本一起使用的库。

这是一个例子:
http://blog.growlforwindows.com/2009/04 /new-java-growlgntp-library-available.html

足够简单:

// connect to Growl on the given host
GrowlConnector growl = new GrowlConnector("hostname");

// give your application a name and icon (optionally)
Application downloadApp = new Application("Downloader", "http://example.com/icon.png");

// create reusable notification types, their names are used in the Growl settings
NotificationType downloadStarted = new NotificationType("Download started",     "c:\started.png");
NotificationType downloadFinished = new NotificationType("Download finished",     "c:\finished.jpg");
NotificationType[] notificationTypes = new NotificationType[] { downloadStarted,   downloadFinished };

// now register the application in growl
growl.register(downloadApp, notificationTypes);

// create a notification with specific title and message
Notification ubuntuDownload = new Notification(downloadApp, downloadStarted, "Ubuntu  9.4", "654 MB");

// finally send the notification
growl.notify(ubuntuDownload);

Agree with Brian,
the two quoted libraries are the only ones around I think, which work with the latest growl versions.

Here is an example:
http://blog.growlforwindows.com/2009/04/new-java-growlgntp-library-available.html

Simple enough:

// connect to Growl on the given host
GrowlConnector growl = new GrowlConnector("hostname");

// give your application a name and icon (optionally)
Application downloadApp = new Application("Downloader", "http://example.com/icon.png");

// create reusable notification types, their names are used in the Growl settings
NotificationType downloadStarted = new NotificationType("Download started",     "c:\started.png");
NotificationType downloadFinished = new NotificationType("Download finished",     "c:\finished.jpg");
NotificationType[] notificationTypes = new NotificationType[] { downloadStarted,   downloadFinished };

// now register the application in growl
growl.register(downloadApp, notificationTypes);

// create a notification with specific title and message
Notification ubuntuDownload = new Notification(downloadApp, downloadStarted, "Ubuntu  9.4", "654 MB");

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