Package org.apache.wicket.util.watch

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


    // resources no longer in the cache.

    // Note that you can not use Application.get() since removeMarkup() will be called from a
    // ModificationWatcher thread which has no associated Application.

    IModificationWatcher watcher = application.getResourceSettings().getResourceWatcher(false);
    if (watcher != null)
    {
      Iterator<IModifiable> iter = watcher.getEntries().iterator();
      while (iter.hasNext())
      {
        IModifiable modifiable = iter.next();
        if (modifiable instanceof MarkupResourceStream)
        {
View Full Code Here


          return markup;
        }
      }

      // Watch file in the future
      final IModificationWatcher watcher = application.getResourceSettings()
        .getResourceWatcher(true);
      if (watcher != null)
      {
        watcher.add(markupResourceStream, new IChangeListener()
        {
          @Override
          public void onChange()
          {
            if (log.isDebugEnabled())
            {
              log.debug("Remove markup from watcher: " + 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

   */
  @Override
  public void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }

    IFileCleaner fileCleaner = getResourceSettings().getFileCleaner();
    if (fileCleaner != null)
    {
View Full Code Here

   */
  @Override
  public void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }

    IFileCleaner fileCleaner = getResourceSettings().getFileCleaner();
    if (fileCleaner != null)
    {
View Full Code Here

        {
          continue;
        }

        // Watch file modifications
        final IModificationWatcher watcher = context.getResourceWatcher(true);
        if (watcher != null)
        {
          addToWatcher(path, resourceStream, watcher);
        }
View Full Code Here

    // resources no longer in the cache.

    // Note that you can not use Application.get() since removeMarkup() will be called from a
    // ModificationWatcher thread which has no associated Application.

    IModificationWatcher watcher = application.getResourceSettings().getResourceWatcher(false);
    if (watcher != null)
    {
      Iterator<IModifiable> iter = watcher.getEntries().iterator();
      while (iter.hasNext())
      {
        IModifiable modifiable = iter.next();
        if (modifiable instanceof MarkupResourceStream)
        {
View Full Code Here

          return markup;
        }
      }

      // Watch file in the future
      final IModificationWatcher watcher = application.getResourceSettings()
        .getResourceWatcher(true);
      if (watcher != null)
      {
        watcher.add(markupResourceStream, new IChangeListener()
        {
          @Override
          public void onChange()
          {
            if (log.isDebugEnabled())
            {
              log.debug("Remove markup from watcher: " + 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

   */
  @Override
  public void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }

    IFileCleaner fileCleaner = getResourceSettings().getFileCleaner();
    if (fileCleaner != null)
    {
View Full Code Here

    // resources no longer in the cache.

    // Note that you can not use Application.get() since removeMarkup() will be called from a
    // ModificationWatcher thread which has no associated Application.

    IModificationWatcher watcher = application.getResourceSettings().getResourceWatcher(false);
    if (watcher != null)
    {
      Iterator<IModifiable> iter = watcher.getEntries().iterator();
      while (iter.hasNext())
      {
        IModifiable modifiable = iter.next();
        if (modifiable instanceof MarkupResourceStream)
        {
View Full Code Here

        markupKeyCache.put(cacheKey, locationString);
        return markup;
      }

      // Watch file in the future
      final IModificationWatcher watcher = application.getResourceSettings()
        .getResourceWatcher(true);
      if (watcher != null)
      {
        watcher.add(markupResourceStream, new IChangeListener()
        {
          @Override
          public void onChange()
          {
            if (log.isDebugEnabled())
            {
              log.debug("Remove markup from watcher: " + 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

TOP

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

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.