@Controller class WebSocketController extends Object
WebSocketConfig| Constructor and Description |
|---|
WebSocketController(RouteListener routeListener,
RegionService regionService,
LocationService locationService,
VehicleService vehicleService,
DemoService demoService,
org.springframework.context.ApplicationEventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addLocation(PortableLocation request)
Create new location.
|
(package private) void |
addVehicle() |
(package private) void |
changeCapacity(long id,
int capacity) |
(package private) void |
clear() |
(package private) void |
demo(String name)
Load a demo data set.
|
(package private) void |
handleException(Exception exception) |
(package private) void |
removeAnyVehicle() |
(package private) void |
removeLocation(long id)
Delete location.
|
(package private) void |
removeVehicle(long id)
Delete vehicle.
|
(package private) PortableRoutingPlan |
subscribeToRouteTopic()
Subscribe for updates of the VRP route.
|
(package private) ServerInfo |
subscribeToServerInfoTopic()
Subscribe to server info topic.
|
@Autowired WebSocketController(RouteListener routeListener, RegionService regionService, LocationService locationService, VehicleService vehicleService, DemoService demoService, org.springframework.context.ApplicationEventPublisher eventPublisher)
@MessageExceptionHandler void handleException(Exception exception)
@SubscribeMapping(value="/serverInfo") ServerInfo subscribeToServerInfoTopic()
@SubscribeMapping(value="/route") PortableRoutingPlan subscribeToRouteTopic()
@MessageMapping(value="/location") void addLocation(PortableLocation request)
request - new location description@MessageMapping(value="/location/{id}/delete")
void removeLocation(@DestinationVariable
long id)
id - ID of the location to be deleted@MessageMapping(value="/demo/{name}")
void demo(@DestinationVariable
String name)
name - data set name@MessageMapping(value="/clear") void clear()
@MessageMapping(value="vehicle") void addVehicle()
@MessageMapping(value="/vehicle/{id}/delete")
void removeVehicle(@DestinationVariable
long id)
id - ID of the vehicle to be deleted@MessageMapping(value="/vehicle/deleteAny") void removeAnyVehicle()
@MessageMapping(value="/vehicle/{id}/capacity")
void changeCapacity(@DestinationVariable
long id,
int capacity)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.