hiroki | f4ed521 | 2018-05-26 22:39:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.odtn.internal; |
| 18 | |
| 19 | import org.onosproject.odtn.utils.tapi.TapiNepPair; |
| 20 | import org.onosproject.odtn.utils.tapi.TapiConnectionHandler; |
| 21 | |
| 22 | /** |
| 23 | * ODTN Tapi connectivity-service:connection manager. |
| 24 | */ |
| 25 | public interface TapiConnectionManager { |
| 26 | |
| 27 | /** |
| 28 | * Queue Tapi connection object to add to DCS. |
| 29 | * If target connection has lower-connections, they are also queued recursively |
| 30 | * using other TapiConnectionManager instance. |
| 31 | * <p> |
| 32 | * Operation will not be conducted until apply method called. |
| 33 | * |
| 34 | * @param neps Both NodeEdgePoints of Nodes(devices or domains) in the calculated route. |
| 35 | * @return connectionHandler of connection to be created |
| 36 | */ |
| 37 | TapiConnectionHandler createConnection(TapiNepPair neps); |
| 38 | |
| 39 | /** |
| 40 | * Queue Tapi connection object to remove from DCS |
| 41 | * If target connection has lower-connections, they are also queued recursively |
| 42 | * using other TapiConnectionManager instance. |
| 43 | * <p> |
| 44 | * Operation will not be conducted until apply method called. |
| 45 | * |
| 46 | * @param connectionHandler handler of TAPI connection object to be deleted |
| 47 | */ |
| 48 | void deleteConnection(TapiConnectionHandler connectionHandler); |
| 49 | |
| 50 | /** |
| 51 | * Apply add/remove operation for queued connection instances. |
| 52 | * If target connection has lower-connections, they are also operated recursively |
| 53 | * by other TapiConnectionManager instance. |
| 54 | */ |
| 55 | void apply(); |
| 56 | |
| 57 | } |