public class Router
extends java.lang.Object
Constructor and Description |
---|
Router(RouterInfo info,
InterfaceService interfaceService,
DeviceService deviceService,
java.util.function.Consumer<InterfaceProvisionRequest> provisioner,
java.util.function.Consumer<InterfaceProvisionRequest> unprovisioner,
boolean forceUnprovision)
Creates a new router interface manager.
|
Modifier and Type | Method and Description |
---|---|
void |
changeConfiguration(RouterInfo newConfig,
boolean forceUnprovision)
Changes the router configuration.
|
void |
cleanup()
Cleans up the router and unprovisions all interfaces.
|
RouterInfo |
info()
Retrieves the router configuration information.
|
public Router(RouterInfo info, InterfaceService interfaceService, DeviceService deviceService, java.util.function.Consumer<InterfaceProvisionRequest> provisioner, java.util.function.Consumer<InterfaceProvisionRequest> unprovisioner, boolean forceUnprovision)
info
- router configuration informationinterfaceService
- interface servicedeviceService
- device serviceprovisioner
- consumer that will provision new interfacesunprovisioner
- consumer that will unprovision old interfacesforceUnprovision
- force unprovision when the device goes offlinepublic void cleanup()
public RouterInfo info()
public void changeConfiguration(RouterInfo newConfig, boolean forceUnprovision)
newConfig
- new configurationforceUnprovision
- true if we want to force unprovision the device when it goes offline