class 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();
                }
                //Initialize the LSDB and aging process
                area.initializeDb();
            }
        }
    }

    public  OspfInterfaceChannelHandler(Controller controller, List<OspfProcess> processes);

}