本文整理汇总了Java中net.floodlightcontroller.linkdiscovery.internal.EventHistoryTopologyCluster类的典型用法代码示例。如果您正苦于以下问题:Java EventHistoryTopologyCluster类的具体用法?Java EventHistoryTopologyCluster怎么用?Java EventHistoryTopologyCluster使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EventHistoryTopologyCluster类属于net.floodlightcontroller.linkdiscovery.internal包,在下文中一共展示了EventHistoryTopologyCluster类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleEvHistReq
import net.floodlightcontroller.linkdiscovery.internal.EventHistoryTopologyCluster; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologyCluster> 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());
if (topoManager != null) {
return new EventHistory<EventHistoryTopologyCluster>(
topoManager.evHistTopologyCluster, count);
}
return null;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:EventHistoryTopologyClusterResource.java