当前位置: 首页>>代码示例>>Java>>正文


Java ControlMessageEvent类代码示例

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


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

示例1: updateStatsInfo

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
/**
 * Tests the updateStatsInfo method.
 */
@Test
public void updateStatsInfo() {
    Set<ControlMessage> cms = Sets.newHashSet();
    ControlMessage.Type in =  ControlMessage.Type.INBOUND_PACKET;
    ControlMessage.Type out =  ControlMessage.Type.OUTBOUND_PACKET;
    ControlMessage.Type mod =  ControlMessage.Type.FLOW_MOD_PACKET;
    ControlMessage.Type rmv =  ControlMessage.Type.FLOW_REMOVED_PACKET;
    ControlMessage.Type req =  ControlMessage.Type.REQUEST_PACKET;
    ControlMessage.Type rep =  ControlMessage.Type.REPLY_PACKET;

    cms.add(new DefaultControlMessage(in, DID, 0, 0, 0, 0));
    cms.add(new DefaultControlMessage(out, DID, 0, 0, 0, 0));
    cms.add(new DefaultControlMessage(mod, DID, 0, 0, 0, 0));
    cms.add(new DefaultControlMessage(rmv, DID, 0, 0, 0, 0));
    cms.add(new DefaultControlMessage(req, DID, 0, 0, 0, 0));
    cms.add(new DefaultControlMessage(rep, DID, 0, 0, 0, 0));

    providerService.updateStatsInfo(DID, cms);
    validateEvents(ControlMessageEvent.Type.STATS_UPDATE);
    cms.clear();
}
 
开发者ID:shlee89,项目名称:athena,代码行数:25,代码来源:ControlMessageManagerTest.java

示例2: activate

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Activate
public void activate() {
    store.setDelegate(delegate);
    eventDispatcher.addSink(ControlMessageEvent.class, listenerRegistry);

    log.info("Started");
}
 
开发者ID:shlee89,项目名称:athena,代码行数:8,代码来源:ControlMessageManager.java

示例3: deactivate

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Deactivate
public void deactivate() {
    store.unsetDelegate(delegate);
    eventDispatcher.removeSink(ControlMessageEvent.class);

    log.info("Stopped");
}
 
开发者ID:shlee89,项目名称:athena,代码行数:8,代码来源:ControlMessageManager.java

示例4: updateStatsInfo

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Override
public void updateStatsInfo(DeviceId deviceId, Set<ControlMessage> controlMessages) {
    checkNotNull(deviceId, DEVICE_ID_NULL);
    checkValidity();

    ControlMessageEvent event =
            store.updateStatsInfo(this.provider().id(), deviceId, controlMessages);

    post(event);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:11,代码来源:ControlMessageManager.java

示例5: updateStatsInfo

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Override
public ControlMessageEvent updateStatsInfo(ProviderId providerId, DeviceId deviceId,
                                                 Set<ControlMessage> controlMessages) {

    return new ControlMessageEvent(ControlMessageEvent.Type.STATS_UPDATE, controlMessages);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:7,代码来源:DefaultControlMessageStore.java

示例6: notify

import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Override
public void notify(ControlMessageEvent event) {
    post(event);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:5,代码来源:ControlMessageManager.java


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