Interface RouteAware


public interface RouteAware
Implemented by objects that wish to receive a reference to the Route they belong to.

The framework injects the route after it is built but before consumers are started. The primary implementor is Consumer: the consumer attached to a route's input Endpoint is set as route-aware so that it can access route-level metadata (id, policy, etc.) at runtime.

Custom Processors and services may also implement this interface to obtain contextual route information without carrying an explicit route reference in their constructor.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Route
    Gets the Route
    void
    setRoute(@Nullable Route route)
    Injects the Route
  • Method Details

    • setRoute

      void setRoute(@Nullable Route route)
      Injects the Route
      Parameters:
      route - the route
    • getRoute

      @Nullable Route getRoute()
      Gets the Route
      Returns:
      the route, or null if no route has been set.