1de3a1b37d8b9a17a804f1550bd1f47d0ecce723
[openflowplugin.git] / applications / forwardingrules-manager / src / main / java / org / opendaylight / openflowplugin / applications / frm / ForwardingRulesManager.java
1 /**
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.openflowplugin.applications.frm;
10
11 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
21 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
22
23 /**
24  * forwardingrules-manager
25  * org.opendaylight.openflowplugin.applications.frm
26  *
27  * ForwardingRulesManager
28  * It represent a central point for whole modul. Implementation
29  * Flow Provider registers the link FlowChangeListener} and it holds all needed
30  * services for link FlowChangeListener}.
31  *
32  * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
33  *
34  * Created: Aug 25, 2014
35  */
36 public interface ForwardingRulesManager extends AutoCloseable {
37
38     public void start();
39
40     /**
41      * Method returns information :
42      * "is Node with send InstanceIdentifier connected"?
43      *
44      * @param ident - the key of the node
45      * @return boolean - true if device is connected
46      */
47     public boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
48
49     /**
50      * Method add new {@link FlowCapableNode} to active Node Holder.
51      * ActiveNodeHolder prevent unnecessary Operational/DS read for identify
52      * pre-configure and serious Configure/DS transactions.
53      *
54      * @param ident - the key of the node
55      */
56     public void registrateNewNode(InstanceIdentifier<FlowCapableNode> ident);
57
58     /**
59      * Method remove disconnected {@link FlowCapableNode} from active Node
60      * Holder. And all next flows or groups or meters will stay in Config/DS
61      * only.
62      *
63      * @param ident - the key of the node
64      */
65     public void unregistrateNode(InstanceIdentifier<FlowCapableNode> ident);
66
67     /**
68      * Method returns generated transaction ID, which is unique for
69      * every transaction. ID is composite from prefix ("DOM") and unique number.
70      *
71      * @return String transactionID for RPC transaction identification
72      */
73     public String getNewTransactionId();
74
75     /**
76      * Method returns Read Transacion. It is need for Node reconciliation only.
77      *
78      * @return ReadOnlyTransaction
79      */
80     public ReadOnlyTransaction getReadTranaction();
81
82     /**
83      * Flow RPC service
84      *
85      * @return
86      */
87     public SalFlowService getSalFlowService();
88
89     /**
90      * Group RPC service
91      *
92      * @return
93      */
94     public SalGroupService getSalGroupService();
95
96     /**
97      * Meter RPC service
98      *
99      * @return
100      */
101     public SalMeterService getSalMeterService();
102
103     /**
104      * Table RPC service
105      *
106      * @return
107      */
108     public SalTableService getSalTableService();
109
110     /**
111      * Content definition method and prevent code duplicity in Reconcil
112      * @return ForwardingRulesCommiter&lt;Flow&gt;
113      */
114     public ForwardingRulesCommiter<Flow> getFlowCommiter();
115
116     /**
117      * Content definition method and prevent code duplicity in Reconcil
118      * @return ForwardingRulesCommiter&lt;Group&gt;
119      */
120     public ForwardingRulesCommiter<Group> getGroupCommiter();
121
122     /**
123      * Content definition method and prevent code duplicity
124      * @return ForwardingRulesCommiter&lt;Meter&gt;
125      */
126     public ForwardingRulesCommiter<Meter> getMeterCommiter();
127
128     /**
129      * Content definition method and prevent code duplicity
130      * @return ForwardingRulesCommiter&lt;Table&gt;
131      */
132     public ForwardingRulesCommiter<Table> getTableCommiter();
133
134     /**
135      * Content definition method
136      * @return FlowNodeReconciliation
137      */
138     public FlowNodeReconciliation getFlowNodeReconciliation();
139 }
140