Package org.apache.wicket.util.watch

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


   */
  @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

   */
  @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

   */
  @Override
  protected void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }
    super.internalDestroy();
    bufferedResponses.clear();
    getSessionStore().destroy();
    FileCleaner.destroy();
View Full Code Here

      {
        return null;
      }

      // Watch file modifications
      final IModificationWatcher 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

   */
  @Override
  protected void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }
    super.internalDestroy();
    bufferedResponses.clear();
    getSessionStore().destroy();
    FileCleaner.destroy();
View Full Code Here

   */
  @Override
  protected void internalDestroy()
  {
    // destroy the resource watcher
    IModificationWatcher resourceWatcher = getResourceSettings().getResourceWatcher(false);
    if (resourceWatcher != null)
    {
      resourceWatcher.destroy();
    }
    super.internalDestroy();
    bufferedResponses.clear();
    getSessionStore().destroy();
    FileCleaner.destroy();
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 IModificationWatcher watcher = application.getResourceSettings()
        .getResourceWatcher(true);
      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.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

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.