本文整理汇总了Java中net.floodlightcontroller.core.internal.IOFSwitchService类的典型用法代码示例。如果您正苦于以下问题:Java IOFSwitchService类的具体用法?Java IOFSwitchService怎么用?Java IOFSwitchService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IOFSwitchService类属于net.floodlightcontroller.core.internal包,在下文中一共展示了IOFSwitchService类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Before
public void setUp() throws FloodlightModuleException {
final SwitchManager switchManager = new SwitchManager();
final PathVerificationService pathVerificationService = new PathVerificationService();
ofSwitchService = createMock(IOFSwitchService.class);
producer = createMock(KafkaMessageProducer.class);
context.addService(IOFSwitchService.class, ofSwitchService);
context.addService(IRestApiService.class, null);
context.addService(SwitchEventCollector.class, null);
context.addService(KafkaMessageProducer.class, producer);
context.addService(IPathVerificationService.class, pathVerificationService);
context.addService(ISwitchManager.class, switchManager);
switchManager.init(context);
collector = new KafkaMessageCollector();
context.addConfigParam(collector, "topic", "");
context.addConfigParam(collector, "bootstrap-servers", "");
collector.init(context);
initScheme();
}
示例2: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException
{
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
deviceService = context.getServiceImpl(IDeviceService.class);
routingService = context.getServiceImpl(IRoutingService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
linkService = context.getServiceImpl(ILinkDiscoveryService.class);
messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
EnumSet.of(OFType.FLOW_MOD),
OFMESSAGE_DAMPER_TIMEOUT);
library = new FP_LibFloodlight( LoggerFactory.getLogger( getClass() ));
}
示例3: getModuleDependencies
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
l.add(IRestApiService.class);
l.add(IOFSwitchService.class);
l.add(IDeviceService.class);
l.add(IDebugCounterService.class);
l.add(ITopologyService.class);
l.add(IRoutingService.class);
l.add(IStaticFlowEntryPusherService.class);
return l;
}
示例4: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
deviceManagerService = context.getServiceImpl(IDeviceService.class);
routingEngineService = context.getServiceImpl(IRoutingService.class);
topologyService = context.getServiceImpl(ITopologyService.class);
sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
vips = new HashMap<String, LBVip>();
pools = new HashMap<String, LBPool>();
members = new HashMap<String, LBMember>();
vipIpToId = new HashMap<Integer, String>();
vipIpToMac = new HashMap<Integer, MacAddress>();
memberIpToId = new HashMap<Integer, String>();
}
示例5: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
linkDiscoveryService = context.getServiceImpl(ILinkDiscoveryService.class);
threadPoolService = context.getServiceImpl(IThreadPoolService.class);
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
debugEventService = context.getServiceImpl(IDebugEventService.class);
switchPorts = new HashMap<DatapathId, Set<OFPort>>();
switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
directLinks = new HashMap<NodePortTuple, Set<Link>>();
portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
tunnelPorts = new HashSet<NodePortTuple>();
topologyAware = new ArrayList<ITopologyListener>();
ldUpdates = new LinkedBlockingQueue<LDUpdate>();
haListener = new HAListenerDelegate();
registerTopologyDebugCounters();
registerTopologyDebugEvents();
}
示例6: getSwitchFeaturesReply
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
IOFSwitchService switchService =
(IOFSwitchService) getContext().getAttributes().
get(IOFSwitchService.class.getCanonicalName());
IOFSwitch sw = switchService.getSwitch(switchId);
Future<OFFeaturesReply> future;
OFFeaturesReply featuresReply = null;
OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
if (sw != null) {
try {
future = sw.writeRequest(featuresRequest);
featuresReply = future.get(10, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("Failure getting features reply from switch" + sw, e);
}
}
return featuresReply;
}
示例7: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
controller.setStorageSourceService(
context.getServiceImpl(IStorageSourceService.class));
controller.setPktInProcessingService(
context.getServiceImpl(IPktInProcessingTimeService.class));
controller.setDebugCounter(
context.getServiceImpl(IDebugCounterService.class));
controller.setDebugEvent(
context.getServiceImpl(IDebugEventService.class));
controller.setRestApiService(
context.getServiceImpl(IRestApiService.class));
controller.setThreadPoolService(
context.getServiceImpl(IThreadPoolService.class));
controller.setSyncService(
context.getServiceImpl(ISyncService.class));
controller.setSwitchService(
context.getServiceImpl(IOFSwitchService.class));
controller.init(context.getConfigParams(this));
}
示例8: SetUp
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Before
public void SetUp() throws Exception {
fmc = new FloodlightModuleContext();
linkDiscovery = EasyMock.createMock(ILinkDiscoveryService.class);
mockFloodlightProvider = new MockFloodlightProvider();
fmc.addService(IFloodlightProviderService.class, mockFloodlightProvider);
fmc.addService(IOFSwitchService.class, new MockSwitchManager());
fmc.addService(ILinkDiscoveryService.class, linkDiscovery);
fmc.addService(IDebugCounterService.class, new MockDebugCounterService());
fmc.addService(IDebugEventService.class, new MockDebugEventService());
MockThreadPoolService tp = new MockThreadPoolService();
topologyManager = new TopologyManager();
fmc.addService(IThreadPoolService.class, tp);
topologyManager.init(fmc);
tp.init(fmc);
tp.startUp(fmc);
}
示例9: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
logger = LoggerFactory.getLogger(MulticastController.class);
lds = context.getServiceImpl(ILinkDiscoveryService.class);
routingService = context.getServiceImpl(IRoutingService.class);
flowPusher = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
statisticsService = context.getServiceImpl(IStatisticsService.class);
groupDB = new MulticastGroupStore(this);
Map<String, String> configOptions = context.getConfigParams(this);
String topologyFile = configOptions.get("topologyFile");
String ipBandwidthQoSFile = configOptions.get("ipBandwidthQoSFile");
if (topologyFile != null) {
topologyHelper = new TopologyHelper(topologyFile);
} else {
logger.error("topologyFile not provided");
}
logger.info(" QOS file : " + ipBandwidthQoSFile);
flowQoSDemandHelper = new FlowQoSDemandHelper(ipBandwidthQoSFile);
if (statisticsService.getBandwidthConsumption() == null)
statisticsService.collectStatistics(false);
}
示例10: getModuleDependencies
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
l.add(IRestApiService.class);
l.add(IOFSwitchService.class);
l.add(IDeviceService.class);
l.add(IDebugCounterService.class);
l.add(ITopologyService.class);
l.add(IRoutingService.class);
l.add(IStaticFlowEntryPusherService.class);
return l;
}
示例11: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
debugCounterService = context.getServiceImpl(IDebugCounterService.class);
deviceManagerService = context.getServiceImpl(IDeviceService.class);
routingEngineService = context.getServiceImpl(IRoutingService.class);
topologyService = context.getServiceImpl(ITopologyService.class);
sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
switchService = context.getServiceImpl(IOFSwitchService.class);
vips = new HashMap<String, LBVip>();
pools = new HashMap<String, LBPool>();
members = new HashMap<String, LBMember>();
vipIpToId = new HashMap<Integer, String>();
vipIpToMac = new HashMap<Integer, MacAddress>();
memberIpToId = new HashMap<Integer, String>();
}
示例12: getModuleDependencies
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> services = new ArrayList<>(3);
services.add(IFloodlightProviderService.class);
services.add(IOFSwitchService.class);
services.add(IRestApiService.class);
return services;
}
示例13: init
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
ofSwitchService = context.getServiceImpl(IOFSwitchService.class);
restApiService = context.getServiceImpl(IRestApiService.class);
kafkaProducer = context.getServiceImpl(KafkaMessageProducer.class);
// TODO: Ensure Kafka Topics are created..
}
示例14: getModuleDependencies
import net.floodlightcontroller.core.internal.IOFSwitchService; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> services = new ArrayList<>(3);
services.add(IOFSwitchService.class);
services.add(KafkaMessageProducer.class);
services.add(ISwitchManager.class);
return services;
}