2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.protocol_plugins.stub.internal;
11 import org.opendaylight.controller.sal.flowprogrammer.Flow;
12 import org.opendaylight.controller.sal.flowprogrammer.IPluginInFlowProgrammerService;
13 import org.opendaylight.controller.sal.core.Node;
14 import org.opendaylight.controller.sal.utils.Status;
15 import org.opendaylight.controller.sal.utils.StatusCode;
20 * Represents the openflow plugin component in charge of programming the flows
21 * the flow programming and relay them to functional modules above SAL.
23 public class FlowProgrammerService implements IPluginInFlowProgrammerService
29 * Function called by the dependency manager when at least one dependency
30 * become unsatisfied or when the component is shutting down because for
31 * example bundle is being stopped.
38 * Function called by dependency manager after "init ()" is called and after
39 * the services provided by the class are registered in the service registry
46 * Function called by the dependency manager before the services exported by
47 * the component are unregistered, this will be followed by a "destroy ()"
56 * Synchronously add a flow to the network node
61 public Status addFlow(Node node, Flow flow){
62 return new Status(StatusCode.SUCCESS);
66 * Synchronously modify existing flow on the switch
71 public Status modifyFlow(Node node, Flow oldFlow, Flow newFlow){
72 return new Status(StatusCode.SUCCESS);
75 * Synchronously remove the flow from the network node
80 public Status removeFlow(Node node, Flow flow){
81 return new Status(StatusCode.SUCCESS);
85 * Asynchronously add a flow to the network node
91 public Status addFlowAsync(Node node, Flow flow, long rid){
92 return new Status(StatusCode.SUCCESS);
96 * Asynchronously modify existing flow on the switch
102 public Status modifyFlowAsync(Node node, Flow oldFlow, Flow newFlow, long rid){
103 return new Status(StatusCode.SUCCESS);
107 * Asynchronously remove the flow from the network node
113 public Status removeFlowAsync(Node node, Flow flow, long rid){
114 return new Status(StatusCode.SUCCESS);
118 * Remove all flows present on the network node
122 public Status removeAllFlows(Node node){
123 return new Status(StatusCode.SUCCESS);
127 * Send Barrier message synchronously. The caller will be blocked until the
128 * Barrier reply arrives.
132 public Status syncSendBarrierMessage(Node node){
133 return new Status(StatusCode.SUCCESS);
137 * Send Barrier message asynchronously. The caller is not blocked.
141 public Status asyncSendBarrierMessage(Node node){
142 return new Status(StatusCode.SUCCESS);