@Test public void testInitializeInterfaceMap() throws Exception { ospfInterfaceChannelHandler.initializeInterfaceMap(); assertThat(ospfInterfaceChannelHandler, is(notNullValue())); }
public void initializeInterfaceMap() throws Exception { for (OspfProcess process : processes) { for (OspfArea area : process.areas()) { for (OspfInterface ospfInterface : area.ospfInterfaceList()) { OspfInterface anInterface = ospfInterfaceMap.get(ospfInterface.interfaceIndex()); if (anInterface == null) { ospfInterface.setOspfArea(area); ((OspfInterfaceImpl) ospfInterface).setController(controller); ((OspfInterfaceImpl) ospfInterface).setState(OspfInterfaceState.DOWN); ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0")); ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0")); ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface); } ((OspfInterfaceImpl) ospfInterface).setChannel(channel); ospfInterface.interfaceUp(); ospfInterface.startDelayedAckTimer(); } area.initializeDb(); } } }
OspfInterfaceChannelHandler extends IdleStateAwareChannelHandler { public void initializeInterfaceMap() throws Exception { for (OspfProcess process : processes) { for (OspfArea area : process.areas()) { for (OspfInterface ospfInterface : area.ospfInterfaceList()) { OspfInterface anInterface = ospfInterfaceMap.get(ospfInterface.interfaceIndex()); if (anInterface == null) { ospfInterface.setOspfArea(area); ((OspfInterfaceImpl) ospfInterface).setController(controller); ((OspfInterfaceImpl) ospfInterface).setState(OspfInterfaceState.DOWN); ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0")); ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0")); ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface); } ((OspfInterfaceImpl) ospfInterface).setChannel(channel); ospfInterface.interfaceUp(); ospfInterface.startDelayedAckTimer(); } area.initializeDb(); } } } }
OspfInterfaceChannelHandler extends IdleStateAwareChannelHandler { public void initializeInterfaceMap() throws Exception { for (OspfProcess process : processes) { for (OspfArea area : process.areas()) { for (OspfInterface ospfInterface : area.ospfInterfaceList()) { OspfInterface anInterface = ospfInterfaceMap.get(ospfInterface.interfaceIndex()); if (anInterface == null) { ospfInterface.setOspfArea(area); ((OspfInterfaceImpl) ospfInterface).setController(controller); ((OspfInterfaceImpl) ospfInterface).setState(OspfInterfaceState.DOWN); ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0")); ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0")); ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface); } ((OspfInterfaceImpl) ospfInterface).setChannel(channel); ospfInterface.interfaceUp(); ospfInterface.startDelayedAckTimer(); } area.initializeDb(); } } } OspfInterfaceChannelHandler(Controller controller, List<OspfProcess> processes); }
OspfInterfaceChannelHandler extends IdleStateAwareChannelHandler { public void initializeInterfaceMap() throws Exception { for (OspfProcess process : processes) { for (OspfArea area : process.areas()) { for (OspfInterface ospfInterface : area.ospfInterfaceList()) { OspfInterface anInterface = ospfInterfaceMap.get(ospfInterface.interfaceIndex()); if (anInterface == null) { ospfInterface.setOspfArea(area); ((OspfInterfaceImpl) ospfInterface).setController(controller); ((OspfInterfaceImpl) ospfInterface).setState(OspfInterfaceState.DOWN); ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0")); ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0")); ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface); } ((OspfInterfaceImpl) ospfInterface).setChannel(channel); ospfInterface.interfaceUp(); ospfInterface.startDelayedAckTimer(); } area.initializeDb(); } } } OspfInterfaceChannelHandler(Controller controller, List<OspfProcess> processes); void initializeInterfaceMap(); void updateInterfaceMap(List<OspfProcess> ospfProcesses); @Override void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent evt); @Override void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent evt); @Override void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent
            e); @Override void messageReceived(ChannelHandlerContext ctx, MessageEvent
            e); void processOspfMessage(OspfMessage
                                           ospfMessage, ChannelHandlerContext ctx); void sentConfigPacket(byte[] configPacket); }
OspfInterfaceChannelHandler extends IdleStateAwareChannelHandler { public void initializeInterfaceMap() throws Exception { for (OspfProcess process : processes) { for (OspfArea area : process.areas()) { for (OspfInterface ospfInterface : area.ospfInterfaceList()) { OspfInterface anInterface = ospfInterfaceMap.get(ospfInterface.interfaceIndex()); if (anInterface == null) { ospfInterface.setOspfArea(area); ((OspfInterfaceImpl) ospfInterface).setController(controller); ((OspfInterfaceImpl) ospfInterface).setState(OspfInterfaceState.DOWN); ospfInterface.setDr(Ip4Address.valueOf("0.0.0.0")); ospfInterface.setBdr(Ip4Address.valueOf("0.0.0.0")); ospfInterfaceMap.put(ospfInterface.interfaceIndex(), ospfInterface); } ((OspfInterfaceImpl) ospfInterface).setChannel(channel); ospfInterface.interfaceUp(); ospfInterface.startDelayedAckTimer(); } area.initializeDb(); } } } OspfInterfaceChannelHandler(Controller controller, List<OspfProcess> processes); void initializeInterfaceMap(); void updateInterfaceMap(List<OspfProcess> ospfProcesses); @Override void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent evt); @Override void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent evt); @Override void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent
            e); @Override void messageReceived(ChannelHandlerContext ctx, MessageEvent
            e); void processOspfMessage(OspfMessage
                                           ospfMessage, ChannelHandlerContext ctx); void sentConfigPacket(byte[] configPacket);  }