Usages of

org.onosproject.net.host.HostService.addListener(?)
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate public void activate() { topologyService.addListener(listener); resourceManager.addListener(linkResourceListener); deviceService.addListener(deviceListener); hostService.addListener(hostListener); log.info("Started"); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate public void activate() { appId = coreService.registerApplication("org.onosproject.acl"); hostService.addListener(hostListener); idGenerator = coreService.getIdGenerator("acl-ids"); AclRule.bindIdGenerator(idGenerator); log.info("Started"); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate() { appId = coreService.registerApplication("org.onosproject.cordvtn"); nodeStore = storageService.<DeviceId, OvsdbNode>consistentMapBuilder() .withSerializer(Serializer.using(NODE_SERIALIZER.build())) .withName("cordvtn-nodestore") .withApplicationId(appId) .build(); deviceService.addListener(deviceListener); hostService.addListener(hostListener); log.info("Started"); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate() { ApplicationId appId = coreService.registerApplication("org.onosproject.cordvtn"); nodeStore = storageService.<DeviceId, OvsdbNode>consistentMapBuilder() .withSerializer(Serializer.using(NODE_SERIALIZER.build())) .withName("cordvtn-nodestore") .withApplicationId(appId) .build(); deviceService.addListener(deviceListener); hostService.addListener(hostListener); log.info("Started"); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate() { this.appId = coreService.registerApplication(APP_NAME); networkConfigService.addListener(networkConfigListener); hostService.addListener(hostListener); processRouterConfig(); applicationService.registerDeactivateHook(this.appId, () -> routers.forEach((d, r) -> r.cleanup())); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate() { threadFactory = groupedThreads("onos/route", "listener-%d", log); routeStore.setDelegate(delegate); hostService.addListener(hostListener); netcfgRegistry.addListener(netcfgListener); netcfgRegistry.registerConfigFactory(routeConfigFactory); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate public void activate() { topologyService.addListener(listener); resourceService.addListener(resourceListener); hostService.addListener(hostListener); partitionService.addListener(partitionListener); log.info("Started"); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate public void activate() { this.appId = coreService.registerApplication(APP_NAME); deviceService.addListener(deviceListener); networkConfigService.addListener(networkConfigListener); hostService.addListener(hostListener); updateConfig(); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate() { threadFactory = groupedThreads("onos/route", "listener-%d", log); resolvedRouteStore = new DefaultResolvedRouteStore(); routeStore.setDelegate(delegate); hostService.addListener(hostListener); routeStore.getRouteTables().stream() .flatMap(id -> routeStore.getRoutes(id).stream()) .forEach(this::resolve); }
@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY) protected HostService hostService; // code omitted ... @Activate protected void activate(){ connections = new HashSet<>(); codecService.registerCodec(Connection.class, new ConnectionCodec()); // add listener to detect host moved, updated or removed connectionHostListener = new ConnectionHostListener(); hostService.addListener(connectionHostListener); }
Usage snippet has been bookmarked! Review your bookmarks
Thank you! Review your likes