Interface ResourceReload

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ResourceReload
Listener notified when a Resource is re-loaded at runtime, for example after a route file changes.

When live reloading is enabled, the ResourceReloadStrategy invokes onReload(String, Resource) with the resource name and the reloaded Resource, allowing Camel to update routes without a restart.

See Route Reload in the Camel user manual.

Since:
3.14
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onReload(String name, Resource resource)
    Callback when the resource is re-loaded.
  • Method Details

    • onReload

      void onReload(String name, Resource resource) throws Exception
      Callback when the resource is re-loaded.
      Parameters:
      name - name of the resource such as the file name (absolute)
      resource - the resource
      Throws:
      Exception - error reloading the resources