Package org.apache.tapestry5.internal.services.assets

## Interface ResourceChangeTracker

- All Superinterfaces:
    `InvalidationEventHub`, `ResourceDependencies`
  All Known Implementing Classes:
    `ResourceChangeTrackerImpl`

      public interface ResourceChangeTracker
      extends InvalidationEventHub, ResourceDependencies

  Tracks resources (at least, resources that can change because they are on the file system) and acts as an `UpdateListener` to check for changes and notify its listeners.
  Since:
    5.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clearCurrentClassName()` | Informs this service that no component class is associated with the resources being loaded.
    `void` | `forceInvalidationEvent()` | Forces an invalidation event.
    `void` | `setCurrentClassName​(java.lang.String className)` | Informs this service that the resources being loaded are associated with a given Tapestry component (i.e.
    `long` | `trackResource​(Resource resource)` | Start tracking the resource (or return the last modified time of an already tracked resource).

    - ### Methods inherited from interface org.apache.tapestry5.commons.services.InvalidationEventHub

      `addInvalidationCallback, addInvalidationCallback, addInvalidationListener, clearOnInvalidation, fireInvalidationEvent`

    - ### Methods inherited from interface org.apache.tapestry5.services.assets.ResourceDependencies

      `addDependency`

- - ### Method Detail

    - #### trackResource

          long trackResource​(Resource resource)

      Start tracking the resource (or return the last modified time of an already tracked resource). Only file system resources are tracked. Resources are tracked until any resource changes, at which points listeners are notified and the internal state is cleared.
      Parameters:
        `resource` - to track
      Returns:
        last modified time, to nearest second
      See Also:
        `URLChangeTracker`

    - #### forceInvalidationEvent

          void forceInvalidationEvent()

      Forces an invalidation event. This is required in a rare case, to clear out a `StreamableResource` generated from the component message catalog; there are some walls in place that prevent the message catalog's underlying `Resource`s from being exposed.
      Since:
        5.4
      See Also:
        `MessageCatalogResource`

    - #### setCurrentClassName

          void setCurrentClassName​(java.lang.String className)

      Informs this service that the resources being loaded are associated with a given Tapestry component (i.e. component, page, mixin and base) component class.
      Parameters:
        `className` - The fully classified class name of the component or page associated with the current resources being processed.
      Since:
        5.8.3

    - #### clearCurrentClassName

          void clearCurrentClassName()

      Informs this service that no component class is associated with the resources being loaded.
      Since:
        5.8.3