本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFType.FLOW_REMOVED属性的典型用法代码示例。如果您正苦于以下问题:Java OFType.FLOW_REMOVED属性的具体用法?Java OFType.FLOW_REMOVED怎么用?Java OFType.FLOW_REMOVED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.projectfloodlight.openflow.protocol.OFType
的用法示例。
在下文中一共展示了OFType.FLOW_REMOVED属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: receive
@Override
public net.floodlightcontroller.core.IListener.Command receive(
IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
System.out.println("flow expired: "+sw.toString() + msg.toString());
//OFFlowRemoved flowRemoved = (OFFlowRemoved) msg;
if (!switchStates.containsKey(sw))
switchStates.put(sw, new ObfuscationSwitchState(sw));
if (msg.getType() == OFType.FLOW_REMOVED) {
OFFlowRemoved flowRemoved = (OFFlowRemoved) msg;
System.out.println("flow expired: "+sw.toString() + "dst: " + flowRemoved.getCookie());
long dst = flowRemoved.getCookie().getValue();
ObfuscationHeader oHeader = new ObfuscationHeader();
Match match = flowRemoved.getMatch();
switchStates.get(sw).removeDestinationID(dst);
}
return Command.CONTINUE;
}