@Test public void removeHostByDeviceRemove() { provider.modified(CTX_FOR_REMOVE); testProcessor.process(new TestArpPacketContext(DEV1)); testProcessor.process(new TestNaPacketContext(DEV4)); Device device = new DefaultDevice(ProviderId.NONE, deviceId(DEV1), SWITCH, "m", "h", "s", "n", new ChassisId(0L)); deviceService.listener.event(new DeviceEvent(DEVICE_REMOVED, device)); assertEquals("incorrect remove count", 1, providerService.removeCount); device = new DefaultDevice(ProviderId.NONE, deviceId(DEV4), SWITCH, "m", "h", "s", "n", new ChassisId(0L)); deviceService.listener.event(new DeviceEvent(DEVICE_REMOVED, device)); assertEquals("incorrect remove count", 2, providerService.removeCount); }
@Modified public void modified(ComponentContext context) { readComponentConfiguration(context); if (requestInterceptsEnabled) { requestIntercepts(); } else { withdrawIntercepts(); } }
HostLocationProvider extends AbstractProvider implements HostProvider { @Modified public void modified(ComponentContext context) { readComponentConfiguration(context); if (requestInterceptsEnabled) { requestIntercepts(); } else { withdrawIntercepts(); } } }
HostLocationProvider extends AbstractProvider implements HostProvider { @Modified public void modified(ComponentContext context) { readComponentConfiguration(context); if (requestInterceptsEnabled) { requestIntercepts(); } else { withdrawIntercepts(); } } HostLocationProvider(); }
HostLocationProvider extends AbstractProvider implements HostProvider { @Modified public void modified(ComponentContext context) { readComponentConfiguration(context); if (requestInterceptsEnabled) { requestIntercepts(); } else { withdrawIntercepts(); } } HostLocationProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override void triggerProbe(Host host); }
HostLocationProvider extends AbstractProvider implements HostProvider { @Modified public void modified(ComponentContext context) { readComponentConfiguration(context); if (requestInterceptsEnabled) { requestIntercepts(); } else { withdrawIntercepts(); } } HostLocationProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override void triggerProbe(Host host);  }