当前位置: 首页>>代码示例>>Java>>正文


Java IFloodlightModule类代码示例

本文整理汇总了Java中net.floodlightcontroller.core.module.IFloodlightModule的典型用法代码示例。如果您正苦于以下问题:Java IFloodlightModule类的具体用法?Java IFloodlightModule怎么用?Java IFloodlightModule使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IFloodlightModule类属于net.floodlightcontroller.core.module包,在下文中一共展示了IFloodlightModule类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupModules

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:17,代码来源:FloodlightTestModuleLoader.java

示例2: getModuleByName

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:15,代码来源:FloodlightTestModuleLoader.java

示例3: getModuleByService

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:20,代码来源:FloodlightTestModuleLoader.java

示例4: setupModules

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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());
	}
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:FloodlightTestModuleLoader.java

示例5: getModuleByName

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:15,代码来源:FloodlightTestModuleLoader.java

示例6: getModuleByService

import net.floodlightcontroller.core.module.IFloodlightModule; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:20,代码来源:FloodlightTestModuleLoader.java


注:本文中的net.floodlightcontroller.core.module.IFloodlightModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。