本文整理汇总了Java中net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService类的典型用法代码示例。如果您正苦于以下问题:Java ILinkDiscoveryService类的具体用法?Java ILinkDiscoveryService怎么用?Java ILinkDiscoveryService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ILinkDiscoveryService类属于net.floodlightcontroller.linkdiscovery包,在下文中一共展示了ILinkDiscoveryService类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的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() ));
}
示例2: retrieve
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Get("json")
public Set<LinkWithType> retrieve() {
ILinkDiscoveryService ld = (ILinkDiscoveryService)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
Map<Link, LinkInfo> links = new HashMap<Link, LinkInfo>();
Set<LinkWithType> returnLinkSet = new HashSet<LinkWithType>();
if (ld != null) {
links.putAll(ld.getLinks());
for (Link link: links.keySet()) {
LinkInfo info = links.get(link);
LinkType type = ld.getLinkType(link, info);
if (type == LinkType.DIRECT_LINK || type == LinkType.TUNNEL) {
LinkWithType lwt = new LinkWithType(link,
type,LinkDirection.UNIDIRECTIONAL);
returnLinkSet.add(lwt);
}
}
}
return returnLinkSet;
}
示例3: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的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();
}
示例4: SetUp
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的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);
}
示例5: SetUp
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的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(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);
}
示例6: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的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);
}
示例7: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Override
/*
* ??ʼ????Floodlight?ܹ??е?һ?֣???Ҫ???ڽ???ط???????????м???
*/
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
// TODO Auto-generated method stub
floodlightProvider = context
.getServiceImpl(IFloodlightProviderService.class);
linkDiscoveryService = context
.getServiceImpl(ILinkDiscoveryService.class);
System.out.println(">>>>>>Start init flow dispatcher");
// topologyService = context.getServiceImpl(ITopologyService.class);
// messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
// EnumSet.of(OFType.FLOW_MOD), OFMESSAGE_DAMPER_TIMEOUT);
}
示例8: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
linkDiscovery = context.getServiceImpl(ILinkDiscoveryService.class);
threadPool = context.getServiceImpl(IThreadPoolService.class);
floodlightProvider =
context.getServiceImpl(IFloodlightProviderService.class);
restApi = context.getServiceImpl(IRestApiService.class);
debugCounters = context.getServiceImpl(IDebugCounterService.class);
debugEvents = context.getServiceImpl(IDebugEventService.class);
switchPorts = new HashMap<Long,Set<Short>>();
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();
}
示例9: retrieve
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Get("json")
public Set<LinkWithType> retrieve() {
ILinkDiscoveryService ld = (ILinkDiscoveryService)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
Map<Link, LinkInfo> links = new HashMap<Link, LinkInfo>();
Set<LinkWithType> returnLinkSet = new HashSet<LinkWithType>();
if (ld != null) {
links.putAll(ld.getLinks());
for (Link link: links.keySet()) {
LinkInfo info = links.get(link);
LinkWithType lwt = new LinkWithType(link,
info.getSrcPortState(),
info.getDstPortState(),
ld.getLinkType(link, info));
returnLinkSet.add(lwt);
}
}
return returnLinkSet;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:LinksResource.java
示例10: init
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
linkDiscovery = context.getServiceImpl(ILinkDiscoveryService.class);
threadPool = context.getServiceImpl(IThreadPoolService.class);
floodlightProvider =
context.getServiceImpl(IFloodlightProviderService.class);
restApi = context.getServiceImpl(IRestApiService.class);
switchPorts = new HashMap<Long,Set<Short>>();
switchPortLinks = new HashMap<NodePortTuple, Set<Link>>();
directLinks = new HashMap<NodePortTuple, Set<Link>>();
portBroadcastDomainLinks = new HashMap<NodePortTuple, Set<Link>>();
tunnelLinks = new HashMap<NodePortTuple, Set<Link>>();
topologyAware = new ArrayList<ITopologyListener>();
ldUpdates = new LinkedBlockingQueue<LDUpdate>();
appliedUpdates = new ArrayList<LDUpdate>();
clearCurrentTopology();
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:20,代码来源:TopologyManager.java
示例11: handleEvHistReq
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologyCluster> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager topoManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
if (topoManager != null) {
return new EventHistory<EventHistoryTopologyCluster>(
topoManager.evHistTopologyCluster, count);
}
return null;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:EventHistoryTopologyClusterResource.java
示例12: handleEvHistReq
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologySwitch> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager topoManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
return new EventHistory<EventHistoryTopologySwitch>(
topoManager.evHistTopologySwitch, count);
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:21,代码来源:EventHistoryTopologySwitchResource.java
示例13: handleEvHistReq
import net.floodlightcontroller.linkdiscovery.ILinkDiscoveryService; //导入依赖的package包/类
@Get("json")
public EventHistory<EventHistoryTopologyLink> handleEvHistReq() {
// Get the event history count. Last <count> events would be returned
String evHistCount = (String)getRequestAttributes().get("count");
int count = EventHistory.EV_HISTORY_DEFAULT_SIZE;
try {
count = Integer.parseInt(evHistCount);
}
catch(NumberFormatException nFE) {
// Invalid input for event count - use default value
}
LinkDiscoveryManager linkDiscoveryManager =
(LinkDiscoveryManager)getContext().getAttributes().
get(ILinkDiscoveryService.class.getCanonicalName());
if (linkDiscoveryManager != null) {
return new EventHistory<EventHistoryTopologyLink>(
linkDiscoveryManager.evHistTopologyLink, count);
}
return null;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:24,代码来源:EventHistoryTopologyLinkResource.java