Package net.sf.libgrowl

Examples of net.sf.libgrowl.Notification


        runner.executeScript(script);
      } catch (IOException e) {
        mLog.log(Level.SEVERE, "Can't execute AppleScript\n\n" + script, e);
      }
    } else {
      final Notification notification = new Notification(mApplication,
          mNotificationProgram, title, desc, program.getID());
      Icon icon = program.getChannel().getIcon();
      if (icon != null && icon instanceof ImageIcon) {
        try {
          File file = File.createTempFile("tvbrowser", ".png");
          file.deleteOnExit();
          if (IOUtilities.writeImageIconToFile((ImageIcon) icon, "png", file)) {
            notification.setIcon(file.getAbsolutePath());
          }
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
View Full Code Here


    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.Notification

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.