Package net.sf.libgrowl

Examples of net.sf.libgrowl.GrowlConnector


    if (OperatingSystem.isMacOs()) {
      mInitialized = true;
    }
    else {
      try {
        mGrowlConnector = new GrowlConnector();
        mApplication = new Application("TV-Browser");
        File icon = new File(TVBROWSER_ICON_NAME);
        if (icon.isFile()) {
          mApplication.setIcon(icon.getAbsolutePath());
        }
View Full Code Here


    buildNotify = new NotificationType("BuildNotify");
  }
 
  public void send(String clientIp, String password, Message message){
    String messageText = message.getMessageText();
    GrowlConnector growl = new GrowlConnector(clientIp);
    growl.setPassword(password);
    growl.register(jenkinsApp,  new NotificationType[] { buildNotify } );

    Notification jenkinsNotify = new Notification(jenkinsApp, buildNotify, buildName, messageText);
    jenkinsNotify.setSticky(true);
    jenkinsNotify.setCallBackURL(message.getUrl());

    // if growl can't send notification, try to send to mac.
    if (growl.notify(jenkinsNotify) != IResponse.OK){
      MacGrowler notifier = MacGrowler.register( appName, password, clientIp);
      notifier.notify( appName, buildName, messageText, password);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.libgrowl.GrowlConnector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.