本文整理汇总了Java中org.openflow.protocol.action.OFActionOutput.setMaxLength方法的典型用法代码示例。如果您正苦于以下问题:Java OFActionOutput.setMaxLength方法的具体用法?Java OFActionOutput.setMaxLength怎么用?Java OFActionOutput.setMaxLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openflow.protocol.action.OFActionOutput
的用法示例。
在下文中一共展示了OFActionOutput.setMaxLength方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode_output
import org.openflow.protocol.action.OFActionOutput; //导入方法依赖的package包/类
private static SubActionStruct decode_output(String subaction, Logger log) {
SubActionStruct sa = null;
Matcher n;
n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
if (n.matches()) {
OFActionOutput action = new OFActionOutput();
action.setMaxLength(Short.MAX_VALUE);
short port = OFPort.OFPP_NONE.getValue();
if (n.group(1) != null) {
try {
port = get_short(n.group(1));
}
catch (NumberFormatException e) {
log.debug("Invalid port in: '{}' (error ignored)", subaction);
return null;
}
}
else if (n.group(2) != null)
port = OFPort.OFPP_ALL.getValue();
else if (n.group(3) != null)
port = OFPort.OFPP_CONTROLLER.getValue();
else if (n.group(4) != null)
port = OFPort.OFPP_LOCAL.getValue();
else if (n.group(5) != null)
port = OFPort.OFPP_IN_PORT.getValue();
else if (n.group(6) != null)
port = OFPort.OFPP_NORMAL.getValue();
else if (n.group(7) != null)
port = OFPort.OFPP_FLOOD.getValue();
action.setPort(port);
log.debug("action {}", action);
sa = new SubActionStruct();
sa.action = action;
sa.len = OFActionOutput.MINIMUM_LENGTH;
}
else {
log.error("Invalid subaction: '{}'", subaction);
return null;
}
return sa;
}
示例2: decode_output
import org.openflow.protocol.action.OFActionOutput; //导入方法依赖的package包/类
@LogMessageDoc(level="ERROR",
message="Invalid subaction: '{subaction}'",
explanation="A static flow entry contained an invalid subaction",
recommendation=LogMessageDoc.REPORT_CONTROLLER_BUG)
private static SubActionStruct decode_output(String subaction, Logger log) {
SubActionStruct sa = null;
Matcher n;
n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
if (n.matches()) {
OFActionOutput action = new OFActionOutput();
action.setMaxLength(Short.MAX_VALUE);
short port = OFPort.OFPP_NONE.getValue();
if (n.group(1) != null) {
try {
port = get_short(n.group(1));
}
catch (NumberFormatException e) {
log.debug("Invalid port in: '{}' (error ignored)", subaction);
return null;
}
}
else if (n.group(2) != null)
port = OFPort.OFPP_ALL.getValue();
else if (n.group(3) != null)
port = OFPort.OFPP_CONTROLLER.getValue();
else if (n.group(4) != null)
port = OFPort.OFPP_LOCAL.getValue();
else if (n.group(5) != null)
port = OFPort.OFPP_IN_PORT.getValue();
else if (n.group(6) != null)
port = OFPort.OFPP_NORMAL.getValue();
else if (n.group(7) != null)
port = OFPort.OFPP_FLOOD.getValue();
action.setPort(port);
log.debug("action {}", action);
sa = new SubActionStruct();
sa.action = action;
sa.len = OFActionOutput.MINIMUM_LENGTH;
}
else {
log.error("Invalid subaction: '{}'", subaction);
return null;
}
return sa;
}
示例3: decode_output
import org.openflow.protocol.action.OFActionOutput; //导入方法依赖的package包/类
@LogMessageDoc(level="ERROR",
message="Invalid subaction: '{subaction}'",
explanation="A static flow entry contained an invalid subaction",
recommendation=LogMessageDoc.REPORT_CONTROLLER_BUG)
private static SubActionStruct decode_output(String subaction, Logger log) {
SubActionStruct sa = null;
Matcher n;
n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
if (n.matches()) {
OFActionOutput action = new OFActionOutput();
action.setMaxLength((short) Short.MAX_VALUE);
short port = OFPort.OFPP_NONE.getValue();
if (n.group(1) != null) {
try {
port = get_short(n.group(1));
}
catch (NumberFormatException e) {
log.debug("Invalid port in: '{}' (error ignored)", subaction);
return null;
}
}
else if (n.group(2) != null)
port = OFPort.OFPP_ALL.getValue();
else if (n.group(3) != null)
port = OFPort.OFPP_CONTROLLER.getValue();
else if (n.group(4) != null)
port = OFPort.OFPP_LOCAL.getValue();
else if (n.group(5) != null)
port = OFPort.OFPP_IN_PORT.getValue();
else if (n.group(6) != null)
port = OFPort.OFPP_NORMAL.getValue();
else if (n.group(7) != null)
port = OFPort.OFPP_FLOOD.getValue();
action.setPort(port);
log.debug("action {}", action);
sa = new SubActionStruct();
sa.action = action;
sa.len = OFActionOutput.MINIMUM_LENGTH;
}
else {
log.error("Invalid subaction: '{}'", subaction);
return null;
}
return sa;
}
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:49,代码来源:StaticFlowEntries.java
示例4: decode_output
import org.openflow.protocol.action.OFActionOutput; //导入方法依赖的package包/类
private static SubActionStruct decode_output(String subaction, Logger log) {
SubActionStruct sa = null;
Matcher n;
n = Pattern.compile("output=(?:((?:0x)?\\d+)|(all)|(controller)|(local)|(ingress-port)|(normal)|(flood))").matcher(subaction);
if (n.matches()) {
OFActionOutput action = new OFActionOutput();
action.setMaxLength((short) Short.MAX_VALUE);
short port = OFPort.OFPP_NONE.getValue();
if (n.group(1) != null) {
try {
port = get_short(n.group(1));
}
catch (NumberFormatException e) {
log.debug("Invalid port in: '{}' (error ignored)", subaction);
return null;
}
}
else if (n.group(2) != null)
port = OFPort.OFPP_ALL.getValue();
else if (n.group(3) != null)
port = OFPort.OFPP_CONTROLLER.getValue();
else if (n.group(4) != null)
port = OFPort.OFPP_LOCAL.getValue();
else if (n.group(5) != null)
port = OFPort.OFPP_IN_PORT.getValue();
else if (n.group(6) != null)
port = OFPort.OFPP_NORMAL.getValue();
else if (n.group(7) != null)
port = OFPort.OFPP_FLOOD.getValue();
action.setPort(port);
log.debug("action {}", action);
sa = new SubActionStruct();
sa.action = action;
sa.len = OFActionOutput.MINIMUM_LENGTH;
}
else {
log.error("Invalid subaction: '{}'", subaction);
return null;
}
return sa;
}