@Test public void testActivate() { assertEquals("Incorrect provider service", deviceProviderService, provider.providerService); assertEquals("Incorrect application id", applicationId, provider.appId); assertEquals("Incorrect config factory", cfgFactory, provider.factory); assertTrue("Incorrect network config listener", netCfgListeners.contains(provider.cfgLister)); }
@Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); }
SnmpDeviceProvider extends AbstractProvider implements DeviceProvider { @Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); } }
SnmpDeviceProvider extends AbstractProvider implements DeviceProvider { @Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); } SnmpDeviceProvider(); }
SnmpDeviceProvider extends AbstractProvider implements DeviceProvider { @Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); } SnmpDeviceProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(ComponentContext context); @Modified void modified(ComponentContext context); @Override void triggerProbe(DeviceId deviceId); @Override void roleChanged(DeviceId deviceId, MastershipRole newRole); @Override boolean isReachable(DeviceId deviceId); @Override void changePortState(DeviceId deviceId, PortNumber portNumber,
                                boolean enable); }
SnmpDeviceProvider extends AbstractProvider implements DeviceProvider { @Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); } SnmpDeviceProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(ComponentContext context); @Modified void modified(ComponentContext context); @Override void triggerProbe(DeviceId deviceId); @Override void roleChanged(DeviceId deviceId, MastershipRole newRole); @Override boolean isReachable(DeviceId deviceId); @Override void changePortState(DeviceId deviceId, PortNumber portNumber,
                                boolean enable);  }