本文整理汇总了Java中net.floodlightcontroller.core.module.IFloodlightModule.getModuleServices方法的典型用法代码示例。如果您正苦于以下问题:Java IFloodlightModule.getModuleServices方法的具体用法?Java IFloodlightModule.getModuleServices怎么用?Java IFloodlightModule.getModuleServices使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.floodlightcontroller.core.module.IFloodlightModule
的用法示例。
在下文中一共展示了IFloodlightModule.getModuleServices方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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