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


Java Command.CONTINUE属性代码示例

本文整理汇总了Java中net.floodlightcontroller.core.IListener.Command.CONTINUE属性的典型用法代码示例。如果您正苦于以下问题:Java Command.CONTINUE属性的具体用法?Java Command.CONTINUE怎么用?Java Command.CONTINUE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.floodlightcontroller.core.IListener.Command的用法示例。


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

示例1: dispatchMessage

public void dispatchMessage(IOFSwitch sw, OFMessage msg, FloodlightContext bc) {
      List<IOFMessageListener> theListeners = listeners.get(msg.getType()).getOrderedListeners();
      if (theListeners != null) {
          Command result = Command.CONTINUE;
          Iterator<IOFMessageListener> it = theListeners.iterator();
          if (OFType.PACKET_IN.equals(msg.getType())) {
              OFPacketIn pi = (OFPacketIn)msg;
              Ethernet eth = new Ethernet();
              eth.deserialize(pi.getData(), 0, pi.getData().length);
              IFloodlightProviderService.bcStore.put(bc,
                      IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
                      eth);
          }
          while (it.hasNext() && !Command.STOP.equals(result)) {
              result = it.next().receive(sw, msg, bc);
          }
      }
// paag
      for (IControllerCompletionListener listener:completionListeners)
      	listener.onMessageConsumed(sw, msg, bc);
  }
 
开发者ID:telstra,项目名称:open-kilda,代码行数:21,代码来源:MockFloodlightProvider.java

示例2: dispatchMessage

public void dispatchMessage(IOFSwitch sw, OFMessage msg, FloodlightContext bc) {
    List<IOFMessageListener> theListeners = listeners.get(msg.getType()).getOrderedListeners();
    if (theListeners != null) {
        Command result = Command.CONTINUE;
        Iterator<IOFMessageListener> it = theListeners.iterator();
        if (OFType.PACKET_IN.equals(msg.getType())) {
            OFPacketIn pi = (OFPacketIn)msg;
            Ethernet eth = new Ethernet();
            eth.deserialize(pi.getData(), 0, pi.getData().length);
            IFloodlightProviderService.bcStore.put(bc,
                    IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
                    eth);
        }
        while (it.hasNext() && !Command.STOP.equals(result)) {
            result = it.next().receive(sw, msg, bc);
        }
    }
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:18,代码来源:MockFloodlightProvider.java

示例3: dispatchMessage

public void dispatchMessage(IOFSwitch sw, OFMessage msg, FloodlightContext bc) {
    List<IOFMessageListener> theListeners = listeners.get(msg.getType()).getOrderedListeners();
    if (theListeners != null) {
        Command result = Command.CONTINUE;
        Iterator<IOFMessageListener> it = theListeners.iterator();
        if (OFType.PACKET_IN.equals(msg.getType())) {
            OFPacketIn pi = (OFPacketIn)msg;
            Ethernet eth = new Ethernet();
            eth.deserialize(pi.getPacketData(), 0, pi.getPacketData().length);
            IFloodlightProviderService.bcStore.put(bc,
                    IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
                    eth);
        }
        while (it.hasNext() && !Command.STOP.equals(result)) {
            result = it.next().receive(sw, msg, bc);
        }
    }
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:18,代码来源:MockFloodlightProvider.java

示例4: dispatchMessage

public void dispatchMessage(IOFSwitch sw, OFMessage msg, FloodlightContext bc) {
    List<IOFMessageListener> theListeners = listeners.get(msg.getType()).getOrderedListeners();
    if (theListeners != null) {
        Command result = Command.CONTINUE;
        Iterator<IOFMessageListener> it = theListeners.iterator();
        if (OFType.PACKET_IN.equals(msg.getType())) {
            OFPacketIn pi = (OFPacketIn)msg;
            Ethernet eth = new Ethernet();
            eth.deserialize(pi.getPacketData(), 0, pi.getPacketData().length);
            IFloodlightProviderService.bcStore.put(bc, 
                    IFloodlightProviderService.CONTEXT_PI_PAYLOAD, 
                    eth);
        }
        while (it.hasNext() && !Command.STOP.equals(result)) {
            result = it.next().receive(sw, msg, bc);
        }
    }
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:18,代码来源:MockFloodlightProvider.java

示例5: dispatchMessage

public void dispatchMessage(IOFSwitch sw, OFMessage msg, FloodlightContext bc) {
    List<IOFMessageListener> theListeners = listeners.get(msg.getType())
            .getOrderedListeners();
    if (theListeners != null) {
        Command result = Command.CONTINUE;
        Iterator<IOFMessageListener> it = theListeners.iterator();
        if (OFType.PACKET_IN.equals(msg.getType())) {
            OFPacketIn pi = (OFPacketIn) msg;
            Ethernet eth = new Ethernet();
            eth.deserialize(pi.getData(), 0, pi.getData().length);
            IFloodlightProviderService.bcStore.put(bc,
                    IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
                    eth);
        }
        while (it.hasNext() && !Command.STOP.equals(result)) {
            result = it.next().receive(sw, msg, bc);
        }
    }
}
 
开发者ID:opennetworkinglab,项目名称:spring-open,代码行数:19,代码来源:MockFloodlightProvider.java

示例6: processPacketInMessage

@Override
@LogMessageDoc(level="ERROR",
message="Unexpected decision made for this packet-in={}",
explanation="An unsupported PacketIn decision has been " +
		"passed to the flow programming component",
		recommendation=LogMessageDoc.REPORT_CONTROLLER_BUG)
public Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi, IRoutingDecision decision, FloodlightContext cntx) {
	Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD);

	// We found a routing decision (i.e. Firewall is enabled... it's the only thing that makes RoutingDecisions)
	if (decision != null) {
		if (log.isTraceEnabled()) {
			log.trace("Forwaring decision={} was made for PacketIn={}", decision.getRoutingAction().toString(), pi);
		}

		switch(decision.getRoutingAction()) {
		case NONE:
			// don't do anything
			return Command.CONTINUE;
		case FORWARD_OR_FLOOD:
		case FORWARD:
			doForwardFlow(sw, pi, cntx, false);
			return Command.CONTINUE;
		case MULTICAST:
			// treat as broadcast
			doFlood(sw, pi, cntx);
			return Command.CONTINUE;
		case DROP:
			doDropFlow(sw, pi, decision, cntx);
			return Command.CONTINUE;
		default:
			log.error("Unexpected decision made for this packet-in={}", pi, decision.getRoutingAction());
			return Command.CONTINUE;
		}
	} else { // No routing decision was found. Forward to destination or flood if bcast or mcast.
		if (log.isTraceEnabled()) {
			log.trace("No decision was made for PacketIn={}, forwarding", pi);
		}

		if (eth.isBroadcast() || eth.isMulticast()) {
			doFlood(sw, pi, cntx);
		} else {
			doForwardFlow(sw, pi, cntx, false);
		}
	}

	return Command.CONTINUE;
}
 
开发者ID:pixuan,项目名称:floodlight,代码行数:48,代码来源:BaseFailoverForwarding.java


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