Class CachingRouteLocator

java.lang.Object
org.springframework.cloud.gateway.route.CachingRouteLocator
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, RouteLocator, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.ApplicationListener<RefreshRoutesEvent>, org.springframework.core.Ordered

public class CachingRouteLocator extends Object implements org.springframework.core.Ordered, RouteLocator, org.springframework.context.ApplicationListener<RefreshRoutesEvent>, org.springframework.context.ApplicationEventPublisherAware
Author:
Spencer Gibb
  • Constructor Details

    • CachingRouteLocator

      public CachingRouteLocator(RouteLocator delegate)
  • Method Details

    • getRoutes

      public reactor.core.publisher.Flux<Route> getRoutes()
      Specified by:
      getRoutes in interface RouteLocator
    • refresh

      public reactor.core.publisher.Flux<Route> refresh()
      Clears the routes cache.
      Returns:
      routes flux
    • onApplicationEvent

      public void onApplicationEvent(RefreshRoutesEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<RefreshRoutesEvent>
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware