@Override public ListenerRegistration<DropTestCommiter> call() throws Exception { return notificationService.registerNotificationListener(DropTestCommiter.this); } });
@Override public ListenerRegistration<NotificationListener> registerNotificationListener( final NotificationListener listener) { return notificationService.registerNotificationListener(listener); }
@Override public ListenerRegistration<DropTestRpcSender> call() throws Exception { return notificationService.registerNotificationListener(DropTestRpcSender.this); } });
public MapServer(IMappingService mapService, boolean subscriptionService, IMapNotifyHandler notifyHandler, NotificationService notificationService) { Preconditions.checkNotNull(mapService); this.mapService = mapService; this.subscriptionService = subscriptionService; this.notifyHandler = notifyHandler; this.notificationService = notificationService; if (notificationService != null) { notificationService.registerNotificationListener(this); } }
public void init() { LOG.debug("{}: init - registering NotificationListener {}", bundle.getSymbolicName(), notificationListener); registration = notificationService.registerNotificationListener(notificationListener); }
public ArpUtilImpl(DataBroker db, PacketProcessingService packetProcessingService, NotificationPublishService notificationPublishService, NotificationService notificationService, IMdsalApiManager mdsalApiManager, RpcProviderRegistry rpc) { this.dataBroker = db; this.packetProcessingService = packetProcessingService; this.notificationPublishService = notificationPublishService; this.mdsalMgr = mdsalApiManager; this.notificationService = notificationService; this.rpc = rpc; listenerRegistration = notificationService .registerNotificationListener(this); LOGGER.info("ArpUtil Manager Initialized "); }
public EndpointDiscoveredNotificationSupplierImpl(NotificationService notificationService) { // Retrieve reference for Event Registry service BundleContext context = FrameworkUtil.getBundle(this.getClass()).getBundleContext(); ServiceReference<?> serviceReference = context. getServiceReference(EventRegistryService.class); serviceRegistry = (EventRegistryService) context. getService(serviceReference); serviceRegistry.setEventTypeService(this, EventType.ENDPOINT_DISCOVERED); notificationListenerRegistration = notificationService.registerNotificationListener(this); }
/** * Construct a new instance. * * @param nsv A {@link NotificationService} service instance. */ public RoutingTable(NotificationService nsv) { try { registration.set(nsv.registerNotificationListener(this)); } catch (Exception e) { String msg = "Failed to register VTN topology listener."; LOG.error(msg, e); throw new IllegalStateException(msg, e); } resolver = new DijkstraShortestPath<String, OfMockLink>(this); }
/** * Register this instance as a SAL notification listener. * * @param nsv A {@link NotificationService} service instance. */ protected final void registerListener(NotificationService nsv) { try { addCloseable(nsv.registerNotificationListener(this)); } catch (Exception e) { String msg = "Failed to register notification listener: " + getClass().getName(); getLogger().error(msg, e); throw new IllegalStateException(msg, e); } } }
public EndpointManager(DataBroker dataProvider,PacketProcessingService packetProcessingService, SalFlowService flowService, NotificationService notificationService, ScheduledExecutorService executor, SwitchManager switchManager) { this.executor = executor; this.dataProvider = dataProvider; if (notificationService != null && dataProvider != null) { this.arpTasker = new ArpTasker(dataProvider, packetProcessingService, flowService); notificationListenerRegistration = notificationService.registerNotificationListener(arpTasker); } else { LOG.info("Missing service {}", NotificationService.class.getSimpleName()); this.arpTasker = null; this.notificationListenerRegistration = null; } if (dataProvider != null) { endpointListener = new EndpointManagerListener(this.dataProvider, this); ofOverlayContextListener = new OfOverlayContextListener(dataProvider, switchManager); ofOverlayL3ContextListener = new OfOverlayL3ContextListener(dataProvider, switchManager); } else { endpointListener = null; ofOverlayContextListener = null; ofOverlayL3ContextListener = null; } LOG.debug("Initialized OFOverlay endpoint manager"); }
/** * Responsible for listening to data change related to VPN Interface * Bind VPN Service on the interface and informs the BGP service * * @param db - dataBroker service reference */ public VpnInterfaceManager(final DataBroker db, final IBgpManager bgpManager, NotificationService notificationService) { super(VpnInterface.class); broker = db; this.bgpManager = bgpManager; interfaceListener = new InterfaceStateChangeListener(db, this); vpnInterfaceOpListener = new VpnInterfaceOpListener(); arpNotificationHandler = new ArpNotificationHandler(this, broker); notificationService.registerNotificationListener(arpNotificationHandler); registerListener(db); }
LOG.info("Registering notification listener on {} for node: {}", VrfRouteNotification.QNAME, nodeId); final ListenerRegistration<ExampleNotificationsListener> accessTopologyListenerListenerRegistration = service1.get().registerNotificationListener(listener);
listener = new NtfbenchTestListener(payloadSize); listeners.add(listenService.registerNotificationListener(listener));
listener = new NtfbenchTestListener(payloadSize); listeners.add(listenService.registerNotificationListener(listener));
@Override public void onSessionInitiated(ProviderContext session) { LOG.info("AlivenessMonitorProvider Session Initiated"); try { final DataBroker dataBroker = session.getSALService(DataBroker.class); PacketProcessingService pktProcessingService = session.getRpcService(PacketProcessingService.class); IdManagerService idManager = rpcProviderRegistry.getRpcService(IdManagerService.class); OdlInterfaceRpcService interfaceService = rpcProviderRegistry.getRpcService(OdlInterfaceRpcService.class); alivenessMonitor = new AlivenessMonitor(dataBroker); alivenessMonitor.setPacketProcessingService(pktProcessingService); alivenessMonitor.setNotificationPublishService(notificationPublishService); alivenessMonitor.setIdManager(idManager); alivenessMonitor.setInterfaceManager(interfaceService); rpcRegistration = getRpcProviderRegistry().addRpcImplementation(AlivenessMonitorService.class, alivenessMonitor); listenerRegistration = notificationService.registerNotificationListener(alivenessMonitor); //ARP Handler AlivenessProtocolHandler arpHandler = new AlivenessProtocolHandlerARP(alivenessMonitor); OdlArputilService arpService = rpcProviderRegistry.getRpcService(OdlArputilService.class); ((AlivenessProtocolHandlerARP) arpHandler).setArpManagerService(arpService); alivenessMonitor.registerHandler(EtherTypes.Arp, arpHandler); //LLDP Handler AlivenessProtocolHandler lldpHandler = new AlivenessProtocolHandlerLLDP(alivenessMonitor); alivenessMonitor.registerHandler(EtherTypes.Lldp, lldpHandler); //TODO: Enable Interface Event Listener //DelegatingInterfaceEventListener listener = new DelegatingInterfaceEventListener(alivenessMonitor); //interfaceListenerRegistration = notificationService.registerNotificationListener(listener); } catch (Exception e) { LOG.error("Error initializing AlivenessMonitor service", e); } }