Examples of NotificationListener


Examples of aQute.bnd.build.ProjectLauncher.NotificationListener

        synchronized (model) {
            bndLauncher = model.getProjectLauncher();
        }
        configureLauncher(configuration);

        bndLauncher.registerForNotifications(new NotificationListener() {
            @Override
            public void notify(NotificationType type, final String notification) {

                if (type == NotificationType.ERROR) {
                    display.syncExec(new Runnable() {
View Full Code Here

Examples of com.akdeniz.googleplaycrawler.gsf.NotificationListener

    }
   
    private void useGCMCommand() throws Exception {
  String ac2dmAuth = loginAC2DM();
 
  MTalkConnector connector = new MTalkConnector(new NotificationListener(service));
  ConnectFuture connectFuture = connector.connect();
  connectFuture.await(TIMEOUT);
  if (!connectFuture.isConnected()) {
      throw new IOException("Couldn't connect to GTALK server!");
  }
View Full Code Here

Examples of com.intellij.notification.NotificationListener

        } else if (status == DUPLICATE) {
          type = NotificationType.WARNING;
        } else {
          type = NotificationType.INFORMATION;
        }
        NotificationListener listener = url != null ? new NotificationListener() {
          @Override
          public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
            BrowserUtil.browse(url);
            notification.expire();
          }
View Full Code Here

Examples of com.intellij.notification.NotificationListener

    public static void sendErrorNotification(Project project, String title, String message, String ... args) {
        sendNotification(project, NotificationType.ERROR, title, message, args);
    }

    public static void sendNotification(Project project, NotificationType type, String title, String message, String ... args) {
        final NotificationListener listener = new NotificationListener() {
            public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
                notification.expire();
            }
        };
View Full Code Here

Examples of com.intellij.notification.NotificationListener

  }

  public static void checkThatGroovyIsOnClasspath() {
    if (isGroovyOnClasspath()) return;

    NotificationListener listener = new NotificationListener() {
      @Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
        boolean downloaded = downloadFile("http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.0.6/", "groovy-all-2.0.6.jar", LIVEPLUGIN_LIBS_PATH);
        if (downloaded) {
          notification.expire();
          askIsUserWantsToRestartIde("For Groovy libraries to be loaded IDE restart is required. Restart now?");
View Full Code Here

Examples of com.intellij.notification.NotificationListener

    private static final String OLD_IMPORT = "import intellijeval";
    private static final String NEW_STATIC_IMPORT = "import static liveplugin";
    private static final String NEW_IMPORT = "import liveplugin";

    public static void askIfUserWantsToMigrate(final Runnable migrationCallback) {
      NotificationListener listener = new NotificationListener() {
        @Override public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
          migrationCallback.run();
          notification.expire();
        }
      };
View Full Code Here

Examples of com.sun.enterprise.util.NotificationListener

  Vector listenersClone = null;
  synchronized (listeners) {
      listenersClone = (Vector)listeners.clone();
  }
  for (Enumeration e = listenersClone.elements(); e.hasMoreElements();) {
      NotificationListener nl = (NotificationListener) e.nextElement();
      nl.notification(new NotificationEvent(this, NOTIFICATION_TYPE));
  }
    }
View Full Code Here

Examples of de.fu_berlin.inf.dpp.whiteboard.sxe.ISXEMessageHandler.NotificationListener

      protected boolean isNotifying = false;

      {
        WhiteboardManager.getInstance().getSXEMessageHandler()
            .addNotificationListener(new NotificationListener() {

              @Override
              public void beforeNotification() {
                isNotifying = true;
              }
View Full Code Here

Examples of javax.management.NotificationListener

        NotificationEmitter emitter = (NotificationEmitter) mbean;

       
        emitter.addNotificationListener(
          new NotificationListener()
          {
            private long  last_mb_log = Long.MAX_VALUE;
           
            private boolean increase_tried;
           
View Full Code Here

Examples of javax.management.NotificationListener

    OMemoryWatchDog.setPercentageUsageThreshold(iThreshold);

    final MemoryMXBean memBean = ManagementFactory.getMemoryMXBean();

    final NotificationEmitter memEmitter = (NotificationEmitter) memBean;
    memEmitter.addNotificationListener(new NotificationListener() {
      public synchronized void handleNotification(Notification n, Object hb) {
        if (n.getType().equals(MemoryNotificationInfo.MEMORY_THRESHOLD_EXCEEDED)) {
          alertTimes++;
          long maxMemory = tenuredGenPool.getUsage().getMax();
          long usedMemory = tenuredGenPool.getUsage().getUsed();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.