2011-11-09 4 views
1

Growl은 다른 앱으로부터 알림을 수신하는 네트워크 프로토콜을 가지고 있습니다.Growl 용 Java API

IT는 jitsi 프로젝트 (일명 SIP Communicator에서) notfication 이러한 유형을 사용하지만 아마 2009 년

그러나 코드의 구글 여름 동안 개발 한 라이브러리라는 growl4j을 의미 것 같다,이 라이브러리는 더 이상 존재하지 않는 것 ? growl4j.dev.java.net과 관련된 google에서 발견 된 일부 흔적이 있지만 더 이상 존재하지 않습니다.

왜 그런가? 1.3 (그들은 으르렁의 최신 버전에서 작동하므로이 두 가지 모두가 새로운 GNTP 프로토콜을 기반으로

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

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

:

답변

4

여기 으르렁 자바 라이브러리의 몇 가지 링크입니다 + Mac App Store에서).

2

브라이언 (Brian)과 동의하면 두 개의 인용 된 라이브러리가 내가 생각하기에 가장 최근의 버전을 사용하는 유일한 라이브러리입니다. 충분히 간단한 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); 
다음

은 예입니다