本文整理汇总了Java中org.onosproject.ospf.controller.OspfRouter.setInterfaceId方法的典型用法代码示例。如果您正苦于以下问题:Java OspfRouter.setInterfaceId方法的具体用法?Java OspfRouter.setInterfaceId怎么用?Java OspfRouter.setInterfaceId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.ospf.controller.OspfRouter
的用法示例。
在下文中一共展示了OspfRouter.setInterfaceId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: neighborDown
import org.onosproject.ospf.controller.OspfRouter; //导入方法依赖的package包/类
/**
* Called when neighbor is down.
*
* @throws Exception might throws exception
*/
public void neighborDown() throws Exception {
log.debug("Neighbor Down {} and NeighborId {}", neighborIpAddr,
neighborId);
stopInactivityTimeCheck();
stopRxMtDdTimer();
stopRxMtLsrTimer();
if (floodingTimerScheduled) {
stopFloodingTimer();
floodingTimerScheduled = false;
}
state = OspfNeighborState.DOWN;
ospfArea.refreshArea(ospfInterface);
lsReqList.clear();
ddSummaryList.clear();
if (neighborIpAddr.equals(neighborBdr) ||
neighborIpAddr.equals(neighborDr)) {
((OspfInterfaceImpl) ospfInterface).neighborChange();
}
log.debug("Neighbor Went Down : "
+ this.neighborIpAddr + " , " + this.neighborId);
removeDeviceDetails(this.neighborId);
OspfRouter ospfRouter = new OspfRouterImpl();
ospfRouter.setRouterIp(this.neighborId());
ospfRouter.setInterfaceId(ospfInterface.ipAddress());
ospfRouter.setAreaIdOfInterface(ospfArea.areaId());
ospfRouter.setDeviceTed(new OspfDeviceTedImpl());
((OspfInterfaceImpl) ospfInterface).removeDeviceInformation(ospfRouter);
removeDeviceDetails(this.neighborIpAddr);
OspfRouter ospfRouter1 = new OspfRouterImpl();
ospfRouter1.setRouterIp(this.neighborIpAddr);
ospfRouter1.setInterfaceId(ospfInterface.ipAddress());
ospfRouter1.setAreaIdOfInterface(ospfArea.areaId());
ospfRouter1.setDeviceTed(new OspfDeviceTedImpl());
((OspfInterfaceImpl) ospfInterface).removeDeviceInformation(ospfRouter1);
}
示例2: ospfTopologyProviderTestAddDevice2
import org.onosproject.ospf.controller.OspfRouter; //导入方法依赖的package包/类
@Test
public void ospfTopologyProviderTestAddDevice2() {
int deviceAddCount = 0;
OspfRouter ospfRouter = new OspfRouterImpl();
ospfRouter.setDr(true);
ospfRouter.setOpaque(true);
ospfRouter.setNeighborRouterId(Ip4Address.valueOf("3.3.3.3"));
ospfRouter.setInterfaceId(Ip4Address.valueOf("10.10.10.3"));
ospfRouter.setAreaIdOfInterface(Ip4Address.valueOf("6.6.6.6"));
ospfRouter.setRouterIp(Ip4Address.valueOf("7.7.7.7"));
OspfDeviceTed ospfDeviceTed = new OspfDeviceTedImpl();
ospfDeviceTed.setAbr(true);
ospfDeviceTed.setAsbr(true);
ospfRouter.setDeviceTed(ospfDeviceTed);
OspfLinkTed ospfLinkTed = new OspfLinkTedImpl();
ospfLinkTed.setMaximumLink(Bandwidth.bps(30));
ospfLinkTed.setMaxReserved(Bandwidth.bps(40));
ospfLinkTed.setTeMetric(50);
for (OspfRouterListener l : controller.nodeListener) {
l.routerAdded(ospfRouter);
deviceAddCount = nodeRegistry.connected.size();
assertTrue(deviceAddCount == 1);
l.routerRemoved(ospfRouter);
deviceAddCount = nodeRegistry.connected.size();
assertTrue(deviceAddCount == 0);
}
}
示例3: neighborDown
import org.onosproject.ospf.controller.OspfRouter; //导入方法依赖的package包/类
/**
* Called when neighbor is down.
*/
public void neighborDown() {
log.debug("Neighbor Down {} and NeighborId {}", neighborIpAddr,
neighborId);
stopInactivityTimeCheck();
stopRxMtDdTimer();
stopRxMtLsrTimer();
if (floodingTimerScheduled) {
stopFloodingTimer();
floodingTimerScheduled = false;
}
state = OspfNeighborState.DOWN;
ospfArea.refreshArea(ospfInterface);
lsReqList.clear();
ddSummaryList.clear();
if (neighborIpAddr.equals(neighborBdr) ||
neighborIpAddr.equals(neighborDr)) {
((OspfInterfaceImpl) ospfInterface).neighborChange();
}
log.debug("Neighbor Went Down : "
+ this.neighborIpAddr + " , " + this.neighborId);
removeDeviceDetails(this.neighborId);
OspfRouter ospfRouter = new OspfRouterImpl();
ospfRouter.setRouterIp(this.neighborId());
ospfRouter.setInterfaceId(ospfInterface.ipAddress());
ospfRouter.setAreaIdOfInterface(ospfArea.areaId());
ospfRouter.setDeviceTed(new OspfDeviceTedImpl());
((OspfInterfaceImpl) ospfInterface).removeDeviceInformation(ospfRouter);
removeDeviceDetails(this.neighborIpAddr);
OspfRouter ospfRouter1 = new OspfRouterImpl();
ospfRouter1.setRouterIp(this.neighborIpAddr);
ospfRouter1.setInterfaceId(ospfInterface.ipAddress());
ospfRouter1.setAreaIdOfInterface(ospfArea.areaId());
ospfRouter1.setDeviceTed(new OspfDeviceTedImpl());
((OspfInterfaceImpl) ospfInterface).removeDeviceInformation(ospfRouter1);
}