当前位置: 首页>>代码示例>>Java>>正文


Java OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint方法代码示例

本文整理汇总了Java中org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint方法的典型用法代码示例。如果您正苦于以下问题:Java OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint方法的具体用法?Java OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint怎么用?Java OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint的用法示例。


在下文中一共展示了OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: decode_set_vlan_priority

import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint; //导入方法依赖的package包/类
private static SubActionStruct decode_set_vlan_priority(String subaction, Logger log) {
    SubActionStruct sa = null;
    Matcher n = Pattern.compile("set-vlan-priority=((?:0x)?\\d+)").matcher(subaction); 
    
    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte prior = get_byte(n.group(1));
                OFActionVirtualLanPriorityCodePoint action = new OFActionVirtualLanPriorityCodePoint();
                action.setVirtualLanPriorityCodePoint(prior);
                log.debug("  action {}", action);
                
                sa = new SubActionStruct();
                sa.action = action;
                sa.len = OFActionVirtualLanPriorityCodePoint.MINIMUM_LENGTH;
            }
            catch (NumberFormatException e) {
                log.debug("Invalid VLAN priority in: {} (error ignored)", subaction);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", subaction);
        return null;
    }

    return sa;
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:30,代码来源:LoadBalancer.java

示例2: decode_set_vlan_priority

import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint; //导入方法依赖的package包/类
private static SubActionStruct decode_set_vlan_priority(String subaction, Logger log) {
    SubActionStruct sa = null;
    Matcher n = Pattern.compile("set-vlan-priority=((?:0x)?\\d+)").matcher(subaction); 
    
    if (n.matches()) {            
        if (n.group(1) != null) {
            try {
                byte prior = get_byte(n.group(1));
                OFActionVirtualLanPriorityCodePoint action = new OFActionVirtualLanPriorityCodePoint();
                action.setVirtualLanPriorityCodePoint(prior);
                log.debug("  action {}", action);
                
                sa = new SubActionStruct();
                sa.action = action;
                sa.len = OFActionVirtualLanPriorityCodePoint.MINIMUM_LENGTH;
            }
            catch (NumberFormatException e) {
                log.debug("Invalid VLAN priority in: {} (error ignored)", subaction);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", subaction);
        return null;
    }

    return sa;
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:30,代码来源:StaticFlowEntries.java

示例3: decode_set_vlan_priority

import org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint; //导入方法依赖的package包/类
private static SubActionStruct decode_set_vlan_priority(String subaction, Logger log) {
    SubActionStruct sa = null;
    Matcher n = Pattern.compile("set-vlan-priority=((?:0x)?\\d+)").matcher(subaction);

    if (n.matches()) {
        if (n.group(1) != null) {
            try {
                byte prior = get_byte(n.group(1));
                OFActionVirtualLanPriorityCodePoint action = new OFActionVirtualLanPriorityCodePoint();
                action.setVirtualLanPriorityCodePoint(prior);
                log.debug("  action {}", action);

                sa = new SubActionStruct();
                sa.action = action;
                sa.len = OFActionVirtualLanPriorityCodePoint.MINIMUM_LENGTH;
            }
            catch (NumberFormatException e) {
                log.debug("Invalid VLAN priority in: {} (error ignored)", subaction);
                return null;
            }
        }
    }
    else {
        log.debug("Invalid action: '{}'", subaction);
        return null;
    }

    return sa;
}
 
开发者ID:andi-bigswitch,项目名称:floodlight-oss,代码行数:30,代码来源:StaticFlowEntries.java


注:本文中的org.openflow.protocol.action.OFActionVirtualLanPriorityCodePoint.setVirtualLanPriorityCodePoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。