本文整理汇总了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();
}
示例2: activate
import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Activate
public void activate() {
store.setDelegate(delegate);
eventDispatcher.addSink(ControlMessageEvent.class, listenerRegistry);
log.info("Started");
}
示例3: deactivate
import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Deactivate
public void deactivate() {
store.unsetDelegate(delegate);
eventDispatcher.removeSink(ControlMessageEvent.class);
log.info("Stopped");
}
示例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);
}
示例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);
}
示例6: notify
import org.onosproject.cpman.message.ControlMessageEvent; //导入依赖的package包/类
@Override
public void notify(ControlMessageEvent event) {
post(event);
}