• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java NotificationPublishService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.opendaylight.controller.md.sal.binding.api.NotificationPublishService的典型用法代码示例。如果您正苦于以下问题:Java NotificationPublishService类的具体用法?Java NotificationPublishService怎么用?Java NotificationPublishService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NotificationPublishService类属于org.opendaylight.controller.md.sal.binding.api包,在下文中一共展示了NotificationPublishService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testNotifSubscription3

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Test
public void testNotifSubscription3() throws InterruptedException {
    final CountDownLatch latch = new CountDownLatch(1);
    final TwoLevelListChanged testData = createTestData();

    final TestNotifListener testNotifListener = new TestNotifListener(latch);
    final ListenerRegistration<TestNotifListener> listenerRegistration = getNotificationService()
            .registerNotificationListener(testNotifListener);
    assertNotSame(NotificationPublishService.REJECTED,
            getNotificationPublishService().offerNotification(testData, 5, TimeUnit.SECONDS));

    latch.await();
    assertTrue(testNotifListener.getReceivedNotifications().size() == 1);
    assertEquals(testData, testNotifListener.getReceivedNotifications().get(0));

    listenerRegistration.close();
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:18,代码来源:ForwardedNotificationAdapterTest.java


示例2: createHeliumAdapter

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
private static AutoCloseable createHeliumAdapter(final NotificationPublishService publishService,
        final NotificationService listenService) {
    if (listenService instanceof BindingDOMNotificationServiceAdapter
            && publishService instanceof BindingDOMNotificationPublishServiceAdapter) {
        final BindingDOMNotificationPublishServiceAdapter castedPublish =
                (BindingDOMNotificationPublishServiceAdapter) publishService;
        final BindingDOMNotificationServiceAdapter castedListen =
                (BindingDOMNotificationServiceAdapter) listenService;
        final DOMNotificationPublishService domPublishService = castedPublish.getDomPublishService();
        if (domPublishService instanceof DOMNotificationSubscriptionListenerRegistry) {
            final DOMNotificationSubscriptionListenerRegistry subsRegistry =
                    (DOMNotificationSubscriptionListenerRegistry) domPublishService;
            return new HeliumNotificationProviderServiceWithInterestListeners(castedPublish, castedListen,
                    subsRegistry);
        }
    }
    return new HeliumNotificationProviderServiceAdapter(publishService, listenService);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:19,代码来源:NotificationBrokerImplModule.java


示例3: InterVpnLinkListener

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Inject
public InterVpnLinkListener(final DataBroker dataBroker, final IdManagerService idManager,
                            final IMdsalApiManager mdsalManager, final IBgpManager bgpManager,
                            final IFibManager fibManager, final NotificationPublishService notifService,
                            final IVpnLinkService interVpnLinkService,
                            final InterVpnLinkLocator interVpnLinkLocator,
                            final VpnFootprintService vpnFootprintService,
                            final VpnOpDataSyncer vpnOpDataSyncer,
                            final JobCoordinator jobCoordinator,
                            final InterVpnLinkCache interVpnLinkCache) {
    this.dataBroker = dataBroker;
    this.idManager = idManager;
    this.mdsalManager = mdsalManager;
    this.bgpManager = bgpManager;
    this.fibManager = fibManager;
    this.notificationsService = notifService;
    this.ivpnLinkService = interVpnLinkService;
    this.ivpnLinkLocator = interVpnLinkLocator;
    this.vpnFootprintService = vpnFootprintService;
    this.vpnOpDataSyncer = vpnOpDataSyncer;
    this.jobCoordinator = jobCoordinator;
    this.interVpnLinkCache = interVpnLinkCache;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:24,代码来源:InterVpnLinkListener.java


示例4: NeutronvpnManager

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Inject
public NeutronvpnManager(
        final DataBroker dataBroker, final NotificationPublishService notiPublishService,
        final NeutronvpnNatManager vpnNatMgr, final VpnRpcService vpnRpcSrv, final IElanService elanService,
        final NeutronFloatingToFixedIpMappingChangeListener neutronFloatingToFixedIpMappingChangeListener,
        final NeutronvpnConfig neutronvpnConfig, final IVpnManager vpnManager,
        final JobCoordinator jobCoordinator, final NeutronvpnUtils neutronvpnUtils) {
    this.dataBroker = dataBroker;
    this.managedNewTransactionRunner = new ManagedNewTransactionRunnerImpl(dataBroker);
    nvpnNatManager = vpnNatMgr;
    notificationPublishService = notiPublishService;
    vpnRpcService = vpnRpcSrv;
    this.elanService = elanService;
    floatingIpMapListener = neutronFloatingToFixedIpMappingChangeListener;
    this.neutronvpnConfig = neutronvpnConfig;
    neutronEvpnManager = new NeutronEvpnManager(dataBroker, this, neutronvpnUtils);
    neutronEvpnUtils = new NeutronEvpnUtils(dataBroker, vpnManager, jobCoordinator);
    this.jobCoordinator = jobCoordinator;
    this.neutronvpnUtils = neutronvpnUtils;

    configureFeatures();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:23,代码来源:NeutronvpnManager.java


示例5: FpcagentServiceBase

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
/**
 * Primary Constructor which initializes the common services of the plugin.
 *
 * @param db - Data Broker
 * @param activationService - Activation Service
 * @param monitorService - Monitoring Service
 * @param notificationService - Notification Service
 * @param conf - Fpc Configuration
 */
public FpcagentServiceBase(DataBroker db,
		ActivationThreadPool activationService,
        MonitorWorker monitorService,
        NotificationPublishService notificationService,
        FpcConfig conf) {
    this.db = db;
    this.activationService = activationService;
    this.monitorService = monitorService;
    this.notificationService = notificationService;
    this.TARGET_READ_LIMIT = conf.getTargetReadLimit().intValue();
}
 
开发者ID:opendaylight,项目名称:fpc,代码行数:21,代码来源:FpcagentServiceBase.java


示例6: FpcServiceImpl

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
/**
 * Default Constructor.
 *
 * @param dataBroker - Data Broker
 * @param notificationService - Notification Service
 * @param monitorService - Monitor Service
 * @param activationService - Activation Service
 */
public FpcServiceImpl(DataBroker dataBroker,
        NotificationPublishService notificationService,
        MonitorThreadPool monitorService,
        ActivationThreadPool activationService) {
    this.dataBroker = dataBroker;
    this.notificationService = notificationService;
    this.activationService = activationService;
    this.monitorService = monitorService;
    load();
}
 
开发者ID:opendaylight,项目名称:fpc,代码行数:19,代码来源:FpcServiceImpl.java


示例7: AbstractNtfbenchProducer

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public AbstractNtfbenchProducer(final NotificationPublishService publishService, final int iterations,
        final int payloadSize) {
    this.publishService = publishService;
    this.iterations = iterations;

    final List<Payload> listVals = new ArrayList<>();
    for (int i = 0; i < payloadSize; i++) {
        listVals.add(new PayloadBuilder().setId(i).build());
    }

    ntf = new NtfbenchBuilder().setPayload(listVals).build();
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:13,代码来源:AbstractNtfbenchProducer.java


示例8: offerNotification

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Override
public ListenableFuture<?> offerNotification(final Notification notification) {
    ListenableFuture<?> offerResult = domPublishService.offerNotification(toDomNotification(notification));
    return DOMNotificationPublishService.REJECTED.equals(offerResult)
            ? NotificationPublishService.REJECTED
            : offerResult;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:8,代码来源:BindingDOMNotificationPublishServiceAdapter.java


示例9: start

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public void start() {
    checkState(controllerRoot == null, "Binding Aware Broker was already started.");
    LOG.info("Starting Binding Aware Broker: {}", identifier);

    controllerRoot = new RootSalInstance(getRpcProviderRegistry(), getNotificationBroker());

    final ImmutableClassToInstanceMap.Builder<BindingAwareService> consBuilder = ImmutableClassToInstanceMap
            .builder();

    consBuilder.put(NotificationService.class, getRoot());
    consBuilder.put(RpcConsumerRegistry.class, getRoot());
    if (dataBroker != null) {
        consBuilder.put(DataBroker.class, dataBroker);
    }
    consBuilder.put(MountPointService.class, mountService);

    supportedConsumerServices = consBuilder.build();
    final ImmutableClassToInstanceMap.Builder<BindingAwareService> provBuilder = ImmutableClassToInstanceMap
            .builder();
    provBuilder.putAll(supportedConsumerServices).put(NotificationProviderService.class, getRoot())
            .put(RpcProviderRegistry.class, getRoot());
    if (notificationPublishService != null) {
        provBuilder.put(NotificationPublishService.class, notificationPublishService);
    }

    supportedProviderServices = provBuilder.build();
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:28,代码来源:RootBindingAwareBroker.java


示例10: MdsalLowLevelTestProvider

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public MdsalLowLevelTestProvider(final RpcProviderRegistry rpcRegistry,
                                 final DOMRpcProviderService domRpcService,
                                 final ClusterSingletonServiceProvider singletonService,
                                 final SchemaService schemaService,
                                 final BindingNormalizedNodeSerializer bindingNormalizedNodeSerializer,
                                 final NotificationPublishService notificationPublishService,
                                 final NotificationService notificationService,
                                 final DOMDataBroker domDataBroker,
                                 final DOMDataTreeService domDataTreeService,
                                 final DistributedShardFactory distributedShardFactory,
                                 final DistributedDataStoreInterface configDataStore,
                                 final ActorSystemProvider actorSystemProvider) {
    this.rpcRegistry = rpcRegistry;
    this.domRpcService = domRpcService;
    this.singletonService = singletonService;
    this.schemaService = schemaService;
    this.bindingNormalizedNodeSerializer = bindingNormalizedNodeSerializer;
    this.notificationPublishService = notificationPublishService;
    this.notificationService = notificationService;
    this.domDataBroker = domDataBroker;
    this.domDataTreeService = domDataTreeService;
    this.distributedShardFactory = distributedShardFactory;
    this.configDataStore = configDataStore;
    this.actorSystem = actorSystemProvider.getActorSystem();

    this.prefixLeaderHandler = new PrefixLeaderHandler(domDataTreeService, bindingNormalizedNodeSerializer);

    domDataTreeChangeService =
            (DOMDataTreeChangeService) domDataBroker.getSupportedExtensions().get(DOMDataTreeChangeService.class);

    registration = rpcRegistry.addRpcImplementation(OdlMdsalLowlevelControlService.class, this);

    prefixShardHandler = new PrefixShardHandler(distributedShardFactory, domDataTreeService,
            bindingNormalizedNodeSerializer);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:36,代码来源:MdsalLowLevelTestProvider.java


示例11: PublishNotificationsTask

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public PublishNotificationsTask(final NotificationPublishService notificationPublishService,
                                final String notificationId, final long secondsToTake, final long maxPerSecond) {
    Preconditions.checkNotNull(notificationPublishService);
    Preconditions.checkNotNull(notificationId);
    Preconditions.checkArgument(secondsToTake > 0);
    Preconditions.checkArgument(maxPerSecond > 0);

    this.notificationPublishService = notificationPublishService;
    this.notificationId = notificationId;
    this.timeToTake = secondsToTake * SECOND_AS_NANO;
    this.delay = SECOND_AS_NANO / maxPerSecond;

    LOG.debug("Delay : {}", delay);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:15,代码来源:PublishNotificationsTask.java


示例12: setupToaster

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Before
public void setupToaster() {
    toaster = new OpendaylightToaster();
    toaster.setDataBroker(getDataBroker());
    toaster.init();

    // We'll mock the NotificationProviderService.
    NotificationPublishService mockNotification = mock(NotificationPublishService.class);
    toaster.setNotificationProvider(mockNotification);
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:11,代码来源:OpenDaylightToasterTest.java


示例13: VpnFootprintService

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
@Inject
public VpnFootprintService(final DataBroker dataBroker, final IFibManager fibManager,
        final NotificationPublishService notificationPublishService, final VpnOpDataSyncer vpnOpDataSyncer) {
    this.dataBroker = dataBroker;
    this.fibManager = fibManager;
    this.vpnOpDataSyncer = vpnOpDataSyncer;
    this.notificationPublishService = notificationPublishService;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:9,代码来源:VpnFootprintService.java


示例14: InstructionSchedulerFactoryImpl

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public InstructionSchedulerFactoryImpl(
        final DataBroker dataProvider,
        final RpcProviderRegistry rpcProviderRegistry,
        final NotificationPublishService notifs,
        final Timer timer,
        final ClusterSingletonServiceProvider cssp,
        final BundleContext bundleContext) {
    this.dataProvider = requireNonNull(dataProvider);
    this.notifs = requireNonNull(notifs);
    this.timer = requireNonNull(timer);
    this.rpcProviderRegistry = requireNonNull(rpcProviderRegistry);
    this.bundleContext = requireNonNull(bundleContext);
    this.cssp = requireNonNull(cssp);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:15,代码来源:InstructionSchedulerFactoryImpl.java


示例15: ProgrammingServiceImpl

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
ProgrammingServiceImpl(final DataBroker dataProvider, final NotificationPublishService notifs,
        final ListeningExecutorService executor, final RpcProviderRegistry rpcProviderRegistry,
        final ClusterSingletonServiceProvider cssp, final Timer timer, final String instructionId) {
    this.dataProvider = requireNonNull(dataProvider);
    this.instructionId = requireNonNull(instructionId);
    this.notifs = requireNonNull(notifs);
    this.executor = requireNonNull(executor);
    this.rpcProviderRegistry = requireNonNull(rpcProviderRegistry);
    this.timer = requireNonNull(timer);
    this.qid = KeyedInstanceIdentifier.builder(InstructionsQueue.class,
            new InstructionsQueueKey(this.instructionId)).build();
    this.sgi = ServiceGroupIdentifier.create(this.instructionId + "-service-group");
    LOG.info("Creating Programming Service {}.", this.sgi.getValue());
    this.csspReg = cssp.registerClusterSingletonService(this);
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:16,代码来源:ProgrammingServiceImpl.java


示例16: getMockedNotificationService

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
NotificationPublishService getMockedNotificationService() throws InterruptedException {
    final NotificationPublishService mockedNotificationService = mock(NotificationPublishService.class);

    doAnswer(invocation -> {
        final Object notif = invocation.getArguments()[0];
        assertTrue(Notification.class.isAssignableFrom(notif.getClass()));
        MockedNotificationServiceWrapper.this.publishedNotifications.add((Notification) notif);
        return null;
    }).when(mockedNotificationService).putNotification(any(Notification.class));
    return mockedNotificationService;
}
 
开发者ID:opendaylight,项目名称:bgpcep,代码行数:12,代码来源:MockedNotificationServiceWrapper.java


示例17: ShimSwitchConnectionHandlerImpl

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public ShimSwitchConnectionHandlerImpl(ZeroMQBaseConnector connector,
        NotificationPublishService _notificationProviderService) {
    coreConnector = connector;
    supportedProtocol = null;
    supportedProtocols = new ArrayList<>();
    mapListeners = new HashMap<>();
    mapFeatures = new HashMap<>();
    notificationProviderService = _notificationProviderService;
    swFeaturesUtil = SwitchFeaturesUtil.getInstance();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:11,代码来源:ShimSwitchConnectionHandlerImpl.java


示例18: ShimMessageListener

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public ShimMessageListener(ZeroMQBaseConnector connector, ConnectionAdapter switchConnection, ShimRelay _shimRelay,
        ShimSwitchConnectionHandlerImpl handler, NotificationPublishService _notificationProviderService) {
    this.coreConnector = connector;
    this.switchConnection = switchConnection;
    this.shimRelay = _shimRelay;
    this.connectionHandler = handler;
    notificationProviderService = _notificationProviderService;

    messageTranslators = new ConcurrentHashMap<>();

    addMessageTranslator(ErrorMessage.class, OF10, new ErrorV10Translator());
    addMessageTranslator(ErrorMessage.class, OF13, new ErrorTranslator());
    addMessageTranslator(FlowRemovedMessage.class, OF10, new FlowRemovedTranslator());
    addMessageTranslator(FlowRemovedMessage.class, OF13, new FlowRemovedTranslator());
    addMessageTranslator(PacketInMessage.class, OF10, new PacketInV10Translator());
    addMessageTranslator(PacketInMessage.class, OF13, new PacketInTranslator());
    addMessageTranslator(PortStatusMessage.class, OF10, new PortStatusMessageToNodeConnectorUpdatedTranslator());
    addMessageTranslator(PortStatusMessage.class, OF13, new PortStatusMessageToNodeConnectorUpdatedTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF13,
            new MultiPartReplyPortToNodeConnectorUpdatedTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF10, new MultiPartMessageDescToNodeUpdatedTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF13, new MultiPartMessageDescToNodeUpdatedTranslator());
    addMessageTranslator(ExperimenterMessage.class, OF10, new ExperimenterTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF10, new MultipartReplyTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF13, new MultipartReplyTranslator());
    addMessageTranslator(MultipartReplyMessage.class, OF13,
            new MultipartReplyTableFeaturesToTableUpdatedTranslator());
    addMessageTranslator(GetFeaturesOutput.class, OF10, new FeaturesV10ToNodeConnectorUpdatedTranslator());
    addMessageTranslator(NotificationQueueWrapper.class, OF10, new NotificationPlainTranslator());
    addMessageTranslator(NotificationQueueWrapper.class, OF13, new NotificationPlainTranslator());
    sc = new SessionContextOFImpl();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:33,代码来源:ShimMessageListener.java


示例19: NetideProvider

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public NetideProvider(String _coreAddress, int _corePort, ConnectionConfiguration connectionConfiguration,
        NotificationPublishService _notificationProviderService) {
    coreAddress = _coreAddress;
    corePort = _corePort;
    conf = connectionConfiguration;
    notificationProviderService = _notificationProviderService;
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:8,代码来源:NetideProvider.java


示例20: NtfbenchmarkProvider

import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; //导入依赖的package包/类
public NtfbenchmarkProvider(final NotificationService listenServiceDependency,
        final NotificationPublishService publishServiceDependency) {
    LOG.debug("NtfbenchmarkProvider Constructor");
    listenService = listenServiceDependency;
    publishService = publishServiceDependency;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:7,代码来源:NtfbenchmarkProvider.java



注:本文中的org.opendaylight.controller.md.sal.binding.api.NotificationPublishService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractCellTable类代码示例发布时间:2022-05-22
下一篇:
Java MapLoaderLifecycleSupport类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap