/** * Issue an add-flow RPC request. * * @param w The node RPC watcher. * @param sfs MD-SAL flow service. * @param in The RPC input. * @param discon Determine whether an error caused by disconnection of * OpenFlow secure channel should be logged or not. */ public AddFlowRpc(NodeRpcWatcher w, SalFlowService sfs, AddFlowInput in, boolean discon) { super(w, in, in.getNode(), sfs.addFlow(in), discon); }
/** * Issue an add-flow RPC request. * * <p> * A barrier request will be sent in background after issueing add-flow * RPC request. * </p> * * @param w The flow RPC watcher. * @param sfs MD-SAL flow service. * @param in The RPC input. * @param discon Determine whether an error caused by disconnection of * OpenFlow secure channel should be logged or not. * @return An {@link AddFlowRpc} instance associated with an add-flow * RPC invocation. */ public static AddFlowRpc create(FlowRpcWatcher w, SalFlowService sfs, AddFlowInput in, boolean discon) { AddFlowRpc rpc = new AddFlowRpc(w, sfs, in, discon); w.asyncBarrier(in.getNode()); return rpc; }
return false; if (!Objects.equals(_node, other.getNode())) { return false;
@Override public ListenableFuture<RpcResult<AddFlowOutput>> addFlow(AddFlowInput input) { Flow flow = ToSalConversionsUtils.toFlow(input, null); @SuppressWarnings("unchecked") org.opendaylight.controller.sal.core.Node node = InventoryMapping.toAdNode((InstanceIdentifier<Node>) input .getNode().getValue()); Status status = delegate.addFlowAsync(node, flow); AddFlowOutputBuilder builder = new AddFlowOutputBuilder(); builder.setTransactionId(new TransactionId(BigInteger.valueOf(status.getRequestId()))); AddFlowOutput rpcResultType = builder.build(); return Futures.immediateFuture(RpcResultBuilder.<AddFlowOutput>status(status.isSuccess()) .withResult(rpcResultType).build()); }
this._instructions = base.getInstructions(); this._match = base.getMatch(); this._node = base.getNode(); this._outGroup = base.getOutGroup(); this._outPort = base.getOutPort();