本文整理汇总了Java中net.floodlightcontroller.core.internal.FloodlightProvider类的典型用法代码示例。如果您正苦于以下问题:Java FloodlightProvider类的具体用法?Java FloodlightProvider怎么用?Java FloodlightProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FloodlightProvider类属于net.floodlightcontroller.core.internal包,在下文中一共展示了FloodlightProvider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.floodlightcontroller.core.internal.FloodlightProvider; //导入依赖的package包/类
@Override
public void init(SyncManager syncManager,
FloodlightModuleContext context) {
storageSource = context.getServiceImpl(IStorageSourceService.class);
// storageSource.addListener(CONTROLLER_TABLE_NAME, this);
Map<String, String> config =
context.getConfigParams(FloodlightProvider.class);
thisControllerID = config.get("controllerid");
config = context.getConfigParams(SyncManager.class);
keyStorePath = config.get("keyStorePath");
keyStorePassword = config.get("keyStorePassword");
authScheme = AuthScheme.NO_AUTH;
try {
authScheme = AuthScheme.valueOf(config.get("authScheme"));
} catch (Exception e) {}
}
示例2: init
import net.floodlightcontroller.core.internal.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);
}
示例3: startUp
import net.floodlightcontroller.core.internal.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();
}
示例4: init
import net.floodlightcontroller.core.internal.FloodlightProvider; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
// TODO Auto-generated method stub
this.syncService = context.getServiceImpl(ISyncService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
utilDurable = new UtilDurable();
Map<String, String> configParams = context.getConfigParams(FloodlightProvider.class);
controllerId = configParams.get("controllerId");
}
示例5: startUp
import net.floodlightcontroller.core.internal.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();
}