Class RouteListener
- java.lang.Object
-
- org.optaweb.vehiclerouting.service.route.RouteListener
-
- All Implemented Interfaces:
EventListener,org.springframework.context.ApplicationListener<RouteChangedEvent>
@Service @Profile("!test") public class RouteListener extends Object implements org.springframework.context.ApplicationListener<RouteChangedEvent>Handles route updates emitted by optimization plugin.
-
-
Constructor Summary
Constructors Constructor Description RouteListener(Router router, RoutingPlanConsumer routingPlanConsumer, VehicleRepository vehicleRepository, LocationRepository locationRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutingPlangetBestRoutingPlan()voidonApplicationEvent(RouteChangedEvent event)
-
-
-
Constructor Detail
-
RouteListener
@Autowired RouteListener(Router router, RoutingPlanConsumer routingPlanConsumer, VehicleRepository vehicleRepository, LocationRepository locationRepository)
-
-
Method Detail
-
onApplicationEvent
public void onApplicationEvent(RouteChangedEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<RouteChangedEvent>
-
getBestRoutingPlan
public RoutingPlan getBestRoutingPlan()
-
-