Java 类net.floodlightcontroller.core.module.IFloodlightModule 实例源码

项目:QoS-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) throws FloodlightModuleException {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    fmc = loadModulesFromList(modulesAsString, null, mockedServices);
}
项目:QoS-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:QoS-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:Multipath-Hedera-system-in-Floodlight-controller    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:Multipath-Hedera-system-in-Floodlight-controller    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:Multipath-Hedera-system-in-Floodlight-controller    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:floodlight_with_topoguard    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) throws FloodlightModuleException {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    fmc = loadModulesFromList(modulesAsString, null, mockedServices);
}
项目:floodlight_with_topoguard    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:floodlight_with_topoguard    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:FloodligtModule    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) throws FloodlightModuleException {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    fmc = loadModulesFromList(modulesAsString, null, mockedServices);
}
项目:FloodligtModule    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:FloodligtModule    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:smartenit    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:smartenit    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:smartenit    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:multicastSDN    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) throws FloodlightModuleException {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    fmc = loadModulesFromList(modulesAsString, null, mockedServices);
}
项目:multicastSDN    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:multicastSDN    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:spring-open    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) throws FloodlightModuleException {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    fmc = loadModulesFromList(modulesAsString, null, mockedServices);
}
项目:spring-open    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:spring-open    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:floodlight-qosmanager    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:floodlight-qosmanager    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:floodlight-qosmanager    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:floodlight-nfv    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:floodlight-nfv    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:floodlight-nfv    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:HederaInFloodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:HederaInFloodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:HederaInFloodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:floodlight-oss    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:floodlight-oss    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:floodlight-oss    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:my-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:my-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:my-floodlight    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:FL_HAND    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}
项目:FL_HAND    文件:FloodlightTestModuleLoader.java   
/**
 * Gets the inited/started instance of a module from the context.
 * @param ifl The name if the module to get, i.e. "LearningSwitch.class".
 * @return The inited/started instance of the module.
 */
public IFloodlightModule getModuleByName(Class<? extends IFloodlightModule> ifl) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        if (ifl.getCanonicalName().equals(m.getClass().getCanonicalName())) {
            return m;
        }
    }
    return null;
}
项目:FL_HAND    文件:FloodlightTestModuleLoader.java   
/**
 * Gets an inited/started instance of a service from the context.
 * @param ifs The name of the service to get, i.e. "ITopologyService.class".
 * @return The inited/started instance of the service from teh context.
 */
public IFloodlightService getModuleByService(Class<? extends IFloodlightService> ifs) {
    Collection<IFloodlightModule> modules = fmc.getAllModules();
    for (IFloodlightModule m : modules) {
        Collection<Class<? extends IFloodlightService>> mServs = m.getModuleServices();
        if (mServs == null) continue;
        for (Class<? extends IFloodlightService> mServClass : mServs) {
            if (mServClass.getCanonicalName().equals(ifs.getCanonicalName())) {
                assert(m instanceof IFloodlightService);
                return (IFloodlightService)m;
            }
        }
    }
    return null;
}
项目:sdn-project    文件:FloodlightTestModuleLoader.java   
/**
 * Sets up all modules and their dependencies.
 * @param modules The list of modules that the user wants to load.
 * @param mockedServices The list of services that will be mocked. Any
 * module that provides this service will not be loaded.
 */
public void setupModules(Collection<Class<? extends IFloodlightModule>> modules,
        Collection<IFloodlightService> mockedServices) {
    addDefaultModules(modules);
    Collection<String> modulesAsString = new ArrayList<String>();
    for (Class<? extends IFloodlightModule> m : modules) {
        modulesAsString.add(m.getCanonicalName());
    }

    try {
        fmc = loadModulesFromList(modulesAsString, null, mockedServices);
    } catch (FloodlightModuleException e) {
        log.error(e.getMessage());
    }
}