Package org.apache.wicket.util.watch

Examples of org.apache.wicket.util.watch.ModificationWatcher


        if (resourceWatcher == null)
        {
          final Duration pollFrequency = getResourcePollFrequency();
          if (pollFrequency != null)
          {
            resourceWatcher = new ModificationWatcher(pollFrequency);
          }
        }
      }
    }
    return resourceWatcher;
View Full Code Here


    if (resourceWatcher == null && start)
    {
      final Duration pollFrequency = getResourcePollFrequency();
      if (pollFrequency != null)
      {
        resourceWatcher = new ModificationWatcher(pollFrequency);
      }
    }
    return resourceWatcher;
  }
View Full Code Here

    if (resourceWatcher == null && start)
    {
      final Duration pollFrequency = getResourcePollFrequency();
      if (pollFrequency != null)
      {
        resourceWatcher = new ModificationWatcher(pollFrequency);
      }
    }
    return resourceWatcher;
  }
View Full Code Here

   * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
   */
  protected void internalDestroy()
  {
    // destroy the resource watcher
    ModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }
    super.internalDestroy();
    bufferedResponses.clear();
    getSessionStore().destroy();
    FileCleaner.destroy();
View Full Code Here

    if ((resourceWatcher == null) && start)
    {
      final Duration pollFrequency = getResourcePollFrequency();
      if (pollFrequency != null)
      {
        resourceWatcher = new ModificationWatcher(pollFrequency);
      }
    }
    return resourceWatcher;
  }
View Full Code Here

    if (resourceWatcher == null && start)
    {
      final Duration pollFrequency = getResourcePollFrequency();
      if (pollFrequency != null)
      {
        resourceWatcher = new ModificationWatcher(pollFrequency);
      }
    }
    return resourceWatcher;
  }
View Full Code Here

      // And now remove all watcher entries associated with markup
      // resources no longer in the cache. Note that you can not use
      // Application.get() since removeMarkup() will be call from a
      // ModificationWatcher thread which has no associated Application.
      final ModificationWatcher watcher = application.getResourceSettings()
        .getResourceWatcher(true);
      if (watcher != null)
      {
        Iterator iter = watcher.getEntries().iterator();
        while (iter.hasNext())
        {
          IModifiable modifiable = (IModifiable)iter.next();
          if (modifiable instanceof MarkupResourceStream)
          {
View Full Code Here

      {
        markupKeyCache.put(cacheKey, locationString);
        return markup;
      }
      // Watch file in the future
      final ModificationWatcher watcher = Application.get()
        .getResourceSettings()
        .getResourceWatcher(true);
      if (watcher != null)
      {
        watcher.add(markupResourceStream, new IChangeListener()
        {
          public void onChange()
          {
            if (log.isDebugEnabled())
            {
              log.debug("Remove markup from cache: " + markupResourceStream);
            }

            // Remove the markup from the cache. It will be reloaded
            // next time when the markup is requested.
            watcher.remove(markupResourceStream);
            removeMarkup(cacheKey);
          }
        });
      }
    }
View Full Code Here

   */
  private final Properties loadPropertiesFileAndWatchForChanges(final String key,
    final IResourceStream resourceStream)
  {
    // Watch file modifications
    final ModificationWatcher watcher = application.getResourceSettings().getResourceWatcher(
      true);
    if (watcher != null)
    {
      watcher.add(resourceStream, new IChangeListener()
      {
        public void onChange()
        {
          log.info("A properties files has changed. Removing all entries " +
            "from the cache. Resource: " + resourceStream);
View Full Code Here

    if (resourceWatcher == null && start)
    {
      final Duration pollFrequency = getResourcePollFrequency();
      if (pollFrequency != null)
      {
        resourceWatcher = new ModificationWatcher(pollFrequency);
      }
    }
    return resourceWatcher;
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.watch.ModificationWatcher

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.