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


Java OFFlowModFailedCode类代码示例

本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFFlowModFailedCode的典型用法代码示例。如果您正苦于以下问题:Java OFFlowModFailedCode类的具体用法?Java OFFlowModFailedCode怎么用?Java OFFlowModFailedCode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: processOFError

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
@Override
void processOFError(OFChannelHandler h, OFErrorMsg m)
        throws IOException, SwitchStateException {
    // if we get here, then the error message is for something else
    if (m.getErrType() == OFErrorType.BAD_REQUEST &&
            ((OFBadRequestErrorMsg) m).getCode() ==
            OFBadRequestCode.EPERM) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert

        h.sw.reassertRole();
    } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED &&
            ((OFFlowModFailedErrorMsg) m).getCode() ==
            OFFlowModFailedCode.ALL_TABLES_FULL) {
        h.sw.setTableFull(true);
    } else {
        logError(h, m);
    }
    h.dispatchMessage(m);
}
 
开发者ID:shlee89,项目名称:athena,代码行数:27,代码来源:OFChannelHandler.java

示例2: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.2: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFFlowModFailedCodeSerializerVer12.java

示例3: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.2: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFFlowModFailedCodeSerializerVer12.java

示例4: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.3: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFFlowModFailedCodeSerializerVer13.java

示例5: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.3: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:23,代码来源:OFFlowModFailedCodeSerializerVer13.java

示例6: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case ALL_TABLES_FULL_VAL:
            return OFFlowModFailedCode.ALL_TABLES_FULL;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_EMERG_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_EMERG_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case UNSUPPORTED_VAL:
            return OFFlowModFailedCode.UNSUPPORTED;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.0: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:19,代码来源:OFFlowModFailedCodeSerializerVer10.java

示例7: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case ALL_TABLES_FULL:
            return ALL_TABLES_FULL_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_EMERG_TIMEOUT:
            return BAD_EMERG_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case UNSUPPORTED:
            return UNSUPPORTED_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.0: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:19,代码来源:OFFlowModFailedCodeSerializerVer10.java

示例8: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.1: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:21,代码来源:OFFlowModFailedCodeSerializerVer11.java

示例9: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.1: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:21,代码来源:OFFlowModFailedCodeSerializerVer11.java

示例10: ofWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        case CANT_SYNC_VAL:
            return OFFlowModFailedCode.CANT_SYNC;
        case BAD_PRIORITY_VAL:
            return OFFlowModFailedCode.BAD_PRIORITY;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.4: " + val);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:27,代码来源:OFFlowModFailedCodeSerializerVer14.java

示例11: toWireValue

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        case CANT_SYNC:
            return CANT_SYNC_VAL;
        case BAD_PRIORITY:
            return BAD_PRIORITY_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.4: " + e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:27,代码来源:OFFlowModFailedCodeSerializerVer14.java

示例12: processOFError

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
@Override
void processOFError(OFErrorMsg m) {
	// role changer will ignore the error if it isn't for it
	boolean didHandle = roleChanger.deliverError(m);
	if (didHandle)
		return;
	if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
			(((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
		// We are the master controller and the switch returned
		// a permission error. This is a likely indicator that
		// the switch thinks we are slave. Reassert our
		// role
		// FIXME: this could be really bad during role transitions
		// if two controllers are master (even if its only for
		// a brief period). We might need to see if these errors
		// persist before we reassert
		switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
		log.warn("Received permission error from switch {} while" +
				"being master. Reasserting master role.",
				getSwitchInfoString());
		reassertRole(OFControllerRole.ROLE_MASTER);
	}
	else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
			(((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
		sw.setTableFull(true);
	}
	else {
		logError(m);
	}
	dispatchMessage(m);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:32,代码来源:OFSwitchHandshakeHandler.java

示例13: processOFError

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
@LogMessageDoc(level="WARN",
		message="Received permission error from switch {} while" +
				"being master. Reasserting master role.",
				explanation="The switch has denied an operation likely " +
						"indicating inconsistent controller roles",
						recommendation="This situation can occurs transiently during role" +
								" changes. If, however, the condition persists or happens" +
								" frequently this indicates a role inconsistency. " +
								LogMessageDoc.CHECK_CONTROLLER )
@Override
void processOFError(OFErrorMsg m) {
	// role changer will ignore the error if it isn't for it
	boolean didHandle = roleChanger.deliverError(m);
	if (didHandle)
		return;
	if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
			(((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
		// We are the master controller and the switch returned
		// a permission error. This is a likely indicator that
		// the switch thinks we are slave. Reassert our
		// role
		// FIXME: this could be really bad during role transitions
		// if two controllers are master (even if its only for
		// a brief period). We might need to see if these errors
		// persist before we reassert
		switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
		log.warn("Received permission error from switch {} while" +
				"being master. Reasserting master role.",
				getSwitchInfoString());
		reassertRole(OFControllerRole.ROLE_MASTER);
	}
	else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
			(((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
		sw.setTableFull(true);
	}
	else {
		logError(m);
	}
	dispatchMessage(m);
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:41,代码来源:OFSwitchHandshakeHandler.java

示例14: readFrom

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
 
开发者ID:o3project,项目名称:openflowj-otn,代码行数:8,代码来源:OFFlowModFailedCodeSerializerVer12.java

示例15: processOFError

import org.projectfloodlight.openflow.protocol.OFFlowModFailedCode; //导入依赖的package包/类
@Override
void processOFError(OFChannelHandler h, OFErrorMsg m)
        throws IOException, SwitchStateException {
    // if we get here, then the error message is for something else
    if (m.getErrType() == OFErrorType.BAD_REQUEST &&
            (((OFBadRequestErrorMsg) m).getCode() ==
               OFBadRequestCode.EPERM ||
            ((OFBadRequestErrorMsg) m).getCode() ==
               OFBadRequestCode.IS_SLAVE)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert

        h.sw.reassertRole();
    } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED &&
            ((OFFlowModFailedErrorMsg) m).getCode() ==
            OFFlowModFailedCode.ALL_TABLES_FULL) {
        h.sw.setTableFull(true);
    } else {
        logError(h, m);
    }
    h.dispatchMessage(m);
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:29,代码来源:OFChannelHandler.java


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