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);
}
}