• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java FloodlightProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: init

import net.floodlightcontroller.core.FloodlightProvider; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
        throws FloodlightModuleException {
    // This has to be done here since we don't know what order the
    // startUp methods will be called
    this.restlets = new ArrayList<RestletRoutable>();
    this.fmlContext = context;
    
    // read our config options
    Map<String, String> configOptions = context.getConfigParams(this);
    restHost = configOptions.get("host");
    if (restHost == null) {
        Map<String, String> providerConfigOptions = context.getConfigParams(
        		FloodlightProvider.class);
        restHost = providerConfigOptions.get("openflowhost");
    }
    if (restHost != null) {
    	logger.debug("REST host set to {}", restHost);
    }
    String port = configOptions.get("port");
    if (port != null) {
        restPort = Integer.parseInt(port);
    }
    logger.debug("REST port set to {}", restPort);
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:26,代码来源:RestApiServer.java


示例2: setUp

import net.floodlightcontroller.core.FloodlightProvider; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
    FloodlightModuleContext fmc = new FloodlightModuleContext();
    
    FloodlightProvider cm = new FloodlightProvider();
    controller = (Controller)cm.getServiceImpls().get(IFloodlightProviderService.class);
    fmc.addService(IFloodlightProviderService.class, controller);
    
    MemoryStorageSource memstorage = new MemoryStorageSource();
    fmc.addService(IStorageSourceService.class, memstorage);
    
    RestApiServer restApi = new RestApiServer();
    fmc.addService(IRestApiService.class, restApi);
    
    CounterStore cs = new CounterStore();
    fmc.addService(ICounterStoreService.class, cs);
    
    PktInProcessingTime ppt = new PktInProcessingTime();
    fmc.addService(IPktInProcessingTimeService.class, ppt);
    
    tp = new MockThreadPoolService();
    fmc.addService(IThreadPoolService.class, tp);
    
    ppt.init(fmc);
    restApi.init(fmc);
    memstorage.init(fmc);
    cm.init(fmc);
    tp.init(fmc);
    ppt.startUp(fmc);
    restApi.startUp(fmc);
    memstorage.startUp(fmc);
    cm.startUp(fmc);
    tp.startUp(fmc);
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:36,代码来源:ControllerTest.java


示例3: setUp

import net.floodlightcontroller.core.FloodlightProvider; //导入依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    FloodlightModuleContext fmc = new FloodlightModuleContext();

    FloodlightProvider floodlightProvider = new FloodlightProvider();

    controller = (Controller) floodlightProvider.getServiceImpls().get(
            IFloodlightProviderService.class);
    fmc.addService(IFloodlightProviderService.class, controller);

    RestApiServer restApi = new RestApiServer();
    fmc.addService(IRestApiService.class, restApi);

    DebugCounter counterService = new DebugCounter();
    fmc.addService(IDebugCounterService.class, counterService);

    threadPool = new MockThreadPoolService();
    fmc.addService(IThreadPoolService.class, threadPool);

    IControllerRegistryService registry =
            createMock(IControllerRegistryService.class);
    fmc.addService(IControllerRegistryService.class, registry);
    LinkDiscoveryManager linkDiscovery = new LinkDiscoveryManager();
    fmc.addService(ILinkDiscoveryService.class, linkDiscovery);

    restApi.init(fmc);
    floodlightProvider.init(fmc);
    threadPool.init(fmc);
    linkDiscovery.init(fmc);
    restApi.startUp(fmc);
    floodlightProvider.startUp(fmc);
    threadPool.startUp(fmc);
}
 
开发者ID:opennetworkinglab,项目名称:spring-open,代码行数:36,代码来源:ControllerTest.java


示例4: startUp

import net.floodlightcontroller.core.FloodlightProvider; //导入依赖的package包/类
@Override
public void startUp(FloodlightModuleContext context) {
    Map<String, Object> locals = new HashMap<String, Object>();     
    // add all existing module references to the debug server
    for (Class<? extends IFloodlightService> s : context.getAllServices()) {
        // Put only the last part of the name
        String[] bits = s.getCanonicalName().split("\\.");
        String name = bits[bits.length-1];
        locals.put(name, context.getServiceImpl(s));
    }
    
    // read our config options
    Map<String, String> configOptions = context.getConfigParams(this);
    jythonHost = configOptions.get("host");
    if (jythonHost == null) {
    	Map<String, String> providerConfigOptions = context.getConfigParams(
        		FloodlightProvider.class);
        jythonHost = providerConfigOptions.get("openflowhost");
    }
    if (jythonHost != null) {
    	log.debug("Jython host set to {}", jythonHost);
    }
    String port = configOptions.get("port");
    if (port != null) {
        jythonPort = Integer.parseInt(port);
    }
    log.debug("Jython port set to {}", jythonPort);
    
    JythonServer debug_server = new JythonServer(jythonHost, jythonPort, locals);
    debug_server.start();
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:32,代码来源:JythonDebugInterface.java


示例5: setUp

import net.floodlightcontroller.core.FloodlightProvider; //导入依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
    FloodlightModuleContext fmc = new FloodlightModuleContext();

    FloodlightProvider cm = new FloodlightProvider();
    controller = (Controller)cm.getServiceImpls().get(IFloodlightProviderService.class);
    fmc.addService(IFloodlightProviderService.class, controller);

    MemoryStorageSource memstorage = new MemoryStorageSource();
    fmc.addService(IStorageSourceService.class, memstorage);

    RestApiServer restApi = new RestApiServer();
    fmc.addService(IRestApiService.class, restApi);

    CounterStore cs = new CounterStore();
    fmc.addService(ICounterStoreService.class, cs);

    PktInProcessingTime ppt = new PktInProcessingTime();
    fmc.addService(IPktInProcessingTimeService.class, ppt);

    tp = new MockThreadPoolService();
    fmc.addService(IThreadPoolService.class, tp);

    ppt.init(fmc);
    restApi.init(fmc);
    memstorage.init(fmc);
    cm.init(fmc);
    tp.init(fmc);
    ppt.startUp(fmc);
    restApi.startUp(fmc);
    memstorage.startUp(fmc);
    cm.startUp(fmc);
    tp.startUp(fmc);
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:36,代码来源:ControllerTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LogWriter类代码示例发布时间:2022-05-22
下一篇:
Java KeyboardShortcut类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap