Interface DependencyStrategy

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 DependencyStrategy
Strategy notified when a 3rd-party dependency is detected while loading routes.

Some DSLs declare external dependencies inline; for example YAML DSL routes (as used by Camel K) can list Maven coordinates that the route needs. As such routes are loaded, each detected dependency is reported through onDependency(String) so the runtime can react, for instance by downloading the artifact and adding it to the classpath. The dependency is expressed as a resolver URI such as mvn:com.foo/bar/1.2.3.

See Camel CLI in the Camel user manual.

Since:
3.16
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onDependency(String dependency)
    A dependency was detected
  • Method Details

    • onDependency

      void onDependency(String dependency)
      A dependency was detected
      Parameters:
      dependency - the dependency such as mvn:com.foo/bar/1.2.3