本文整理汇总了Java中net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService类的典型用法代码示例。如果您正苦于以下问题:Java IStaticFlowEntryPusherService类的具体用法?Java IStaticFlowEntryPusherService怎么用?Java IStaticFlowEntryPusherService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IStaticFlowEntryPusherService类属于net.floodlightcontroller.staticflowentry包,在下文中一共展示了IStaticFlowEntryPusherService类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getModuleDependencies
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的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;
}
示例2: init
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的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>();
}
示例3: ListStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get("json")
public OFFlowModMap ListStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Listing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
return new OFFlowModMap(sfpService.getFlows());
} else {
try {
Map<String, Map<String, OFFlowMod>> retMap = new HashMap<String, Map<String, OFFlowMod>>();
retMap.put(param, sfpService.getFlows(DatapathId.of(param)));
return new OFFlowModMap(retMap);
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST, ControllerSwitchesResource.DPID_ERROR);
}
}
return null;
}
示例4: ClearStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get("json")
public String ClearStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Clearing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
sfpService.deleteAllFlows();
return "{\"status\":\"Deleted all flows.\"}";
} else {
try {
sfpService.deleteFlowsForSwitch(DatapathId.of(param));
return "{\"status\":\"Deleted all flows for switch " + param + ".\"}";
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST,
ControllerSwitchesResource.DPID_ERROR);
return "'{\"status\":\"Could not delete flows requested! See controller log for details.\"}'";
}
}
}
示例5: init
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的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);
}
示例6: init
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
restApi = context.getServiceImpl(IRestApiService.class);
counterStore = context.getServiceImpl(ICounterStoreService.class);
deviceManager = context.getServiceImpl(IDeviceService.class);
routingEngine = context.getServiceImpl(IRoutingService.class);
topology = context.getServiceImpl(ITopologyService.class);
sfp = context.getServiceImpl(IStaticFlowEntryPusherService.class);
messageDamper = new OFMessageDamper(OFMESSAGE_DAMPER_CAPACITY,
EnumSet.of(OFType.FLOW_MOD),
OFMESSAGE_DAMPER_TIMEOUT);
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>();
}
示例7: ListStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get
public Map<String, Map<String, OFFlowMod>> ListStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Listing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
return sfpService.getFlows();
} else {
try {
Map<String, Map<String, OFFlowMod>> retMap =
new HashMap<String, Map<String, OFFlowMod>>();
retMap.put(param, sfpService.getFlows(param));
return retMap;
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST,
ControllerSwitchesResource.DPID_ERROR);
}
}
return null;
}
示例8: ClearStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get
public void ClearStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Clearing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
sfpService.deleteAllFlows();
} else {
try {
sfpService.deleteFlowsForSwitch(HexString.toLong(param));
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST,
ControllerSwitchesResource.DPID_ERROR);
return;
}
}
}
示例9: getModuleDependencies
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的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;
}
示例10: init
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的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>();
}
示例11: ListStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get("json")
public OFFlowModMap ListStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Listing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
return new OFFlowModMap(sfpService.getFlows());
} else {
try {
Map<String, Map<String, OFFlowMod>> retMap = new HashMap<String, Map<String, OFFlowMod>>();
retMap.put(param, sfpService.getFlows(DatapathId.of(param)));
return new OFFlowModMap(retMap);
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST, ControllerSwitchesResource.DPID_ERROR);
}
}
return null;
}
示例12: ClearStaticFlowEntries
import net.floodlightcontroller.staticflowentry.IStaticFlowEntryPusherService; //导入依赖的package包/类
@Get("json")
public String ClearStaticFlowEntries() {
IStaticFlowEntryPusherService sfpService =
(IStaticFlowEntryPusherService)getContext().getAttributes().
get(IStaticFlowEntryPusherService.class.getCanonicalName());
String param = (String) getRequestAttributes().get("switch");
if (log.isDebugEnabled())
log.debug("Clearing all static flow entires for switch: " + param);
if (param.toLowerCase().equals("all")) {
sfpService.deleteAllFlows();
return "{\"status\":\"Deleted all flows.\"}";
} else {
try {
sfpService.deleteFlowsForSwitch(DatapathId.of(param));
return "{\"status\":\"Deleted all flows for switch " + param + ".\"}";
} catch (NumberFormatException e){
setStatus(Status.CLIENT_ERROR_BAD_REQUEST,
ControllerSwitchesResource.DPID_ERROR);
return "'{\"status\":\"Could not delete flows requested! See controller log for details.\"}'";
}
}
}