Examples of LoggingSafeRunnable


Examples of org.rssowl.core.model.util.LoggingSafeRunnable

   */
  public void notifySearchConditionAdded(final Set<SearchConditionEvent> events) {
    Object listeners[] = fSearchConditionListeners.getListeners();
    for (Object element : listeners) {
      final SearchConditionListener listener = (SearchConditionListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.searchConditionAdded(events);
        }
      });
    }
View Full Code Here

Examples of org.rssowl.core.model.util.LoggingSafeRunnable

   */
  public void notifySearchConditionDeleted(final Set<SearchConditionEvent> events) {
    Object listeners[] = fSearchConditionListeners.getListeners();
    for (Object element : listeners) {
      final SearchConditionListener listener = (SearchConditionListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.searchConditionDeleted(events);
        }
      });
    }
View Full Code Here

Examples of org.rssowl.core.model.util.LoggingSafeRunnable

   */
  public void notifySearchConditionUpdated(final Set<SearchConditionEvent> events) {
    Object listeners[] = fSearchConditionListeners.getListeners();
    for (Object element : listeners) {
      final SearchConditionListener listener = (SearchConditionListener) element;
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          listener.searchConditionUpdated(events);
        }
      });
    }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

    /* Use the LogBridge as Logger */
    System.setProperty("org.apache.commons.logging.Log", "org.rssowl.core.internal.LogBridge"); //$NON-NLS-1$ //$NON-NLS-2$

    /* Load the Proxy Service */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        fProxyService = loadProxyService();
      }
    });
  }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

   */
  @Override
  public void stop(BundleContext context) throws Exception {

    /* Stop Internal Owl */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        Owl.shutdown(false);
      }
    });

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;

      /* Update state of added news if equivalent news already exists */
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception { //See Bug 1216 (NPE in ModelSearchImpl.getCurrentSearcher)
          updateStateOfUnsavedNewNews(newNewsAdded, monitor);
        }
      });

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;

      /* Retention Policy */
      final List<INews> deletedNews = RetentionStrategy.process(bookMark, feed);
      for (INews news : deletedNews)
        mergeResult.addUpdatedObject(news);

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;

      /* Set ID to News and handle Description entity */
      IDGenerator generator = Owl.getPersistenceService().getIDGenerator();
      for (INews news : newNewsAdded) {

        /* Return early on cancellation */
        if (monitor.isCanceled() || Owl.isShuttingDown())
          return;

        long id;
        if (generator instanceof DB4OIDGenerator)
          id = ((DB4OIDGenerator) generator).getNext(false);
        else
          id = generator.getNext();

        news.setId(id);

        String description = ((News) news).getTransientDescription();
        if (description != null) {
          mergeResult.addUpdatedObject(new Description(news, description));
        }
      }

      /* Return early on cancellation */
      if (monitor.isCanceled() || Owl.isShuttingDown())
        return;

      /* Run News Filters */
      final AtomicBoolean someNewsFiltered = new AtomicBoolean(false);
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          newNewsAdded.removeAll(deletedNews);
          boolean result = runNewsFilters(newNewsAdded, monitor);
          someNewsFiltered.set(result);
        }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

    final Map<INews, INews> replacements= new HashMap<INews, INews>();
    Collection<IFilterAction> actions = CoreUtils.getActions(filter); //Need to sort structural actions to end
    for (final IFilterAction action : actions) {
      final INewsAction newsAction = fNewsActions.get(action.getActionId());
      if (newsAction != null) {
        SafeRunner.run(new LoggingSafeRunnable() {
          public void run() throws Exception {
            newsAction.run(news, replacements, action.getData());
          }
        });
      }
View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

    super.start(context);
    fContext = context;
    fVersion = (String) fPlugin.getBundle().getHeaders().get("Bundle-Version"); //$NON-NLS-1$

    /* Load the Proxy Service */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        fProxyService = loadProxyService();
      }
    });

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

   */
  @Override
  public void stop(BundleContext context) throws Exception {

    /* Stop Internal Owl */
    SafeRunner.run(new LoggingSafeRunnable() {
      public void run() throws Exception {
        InternalOwl.getDefault().shutdown();
      }
    });

View Full Code Here

Examples of org.rssowl.core.util.LoggingSafeRunnable

  public void postStartup() {
    super.postStartup();

    /* Run Runnable if provided */
    if (fRunAfterUIStartup != null) {
      SafeRunner.run(new LoggingSafeRunnable() {
        public void run() throws Exception {
          fRunAfterUIStartup.run();
        }
      });
    }
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.