Sho SHIMIZU | b0a47d4 | 2015-02-19 13:26:30 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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 | package org.onosproject.net.intent.impl; |
| 17 | |
Sho SHIMIZU | b0a47d4 | 2015-02-19 13:26:30 -0800 | [diff] [blame] | 18 | import org.onosproject.net.intent.Intent; |
| 19 | import org.onosproject.net.intent.IntentData; |
| 20 | |
| 21 | import java.util.List; |
| 22 | |
| 23 | /** |
| 24 | * A collection of methods to process an intent. |
| 25 | * |
| 26 | * This interface is public, but intended to be used only by IntentManager and |
| 27 | * IntentProcessPhase subclasses stored under phase package. |
| 28 | */ |
| 29 | public interface IntentProcessor { |
| 30 | |
| 31 | /** |
| 32 | * Compiles an intent recursively. |
| 33 | * |
| 34 | * @param intent intent |
| 35 | * @param previousInstallables previous intent installables |
| 36 | * @return result of compilation |
| 37 | */ |
| 38 | List<Intent> compile(Intent intent, List<Intent> previousInstallables); |
| 39 | |
| 40 | /** |
Ray Milkey | fd7931d | 2015-03-30 13:58:38 -0700 | [diff] [blame^] | 41 | * @param toUninstall Intent data describing flows to uninstall. May be null. |
| 42 | * @param toInstall Intent data describing flows to install. May be null. |
Sho SHIMIZU | b0a47d4 | 2015-02-19 13:26:30 -0800 | [diff] [blame] | 43 | */ |
Ray Milkey | fd7931d | 2015-03-30 13:58:38 -0700 | [diff] [blame^] | 44 | void apply(IntentData toUninstall, IntentData toInstall); |
Sho SHIMIZU | b0a47d4 | 2015-02-19 13:26:30 -0800 | [diff] [blame] | 45 | } |