本文整理汇总了Java中net.floodlightcontroller.linkdiscovery.internal.EventHistoryTopologySwitch类的典型用法代码示例。如果您正苦于以下问题:Java EventHistoryTopologySwitch类的具体用法?Java EventHistoryTopologySwitch怎么用?Java EventHistoryTopologySwitch使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventHistoryTopologySwitch类属于net.floodlightcontroller.linkdiscovery.internal包,在下文中一共展示了EventHistoryTopologySwitch类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleEvHistReq
import net.floodlightcontroller.linkdiscovery.internal.EventHistoryTopologySwitch; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologySwitch> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager topoManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
return new EventHistory<EventHistoryTopologySwitch>(
topoManager.evHistTopologySwitch, count);
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:EventHistoryTopologySwitchResource.java