blob: 766c91fbb4e92ce1a26a5aa20dbdf7dee31160cb [file] [log] [blame]
Sho SHIMIZUb0a47d42015-02-19 13:26:30 -08001/*
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 */
16package org.onosproject.net.intent.impl;
17
Sho SHIMIZUb0a47d42015-02-19 13:26:30 -080018import org.onosproject.net.intent.Intent;
19import org.onosproject.net.intent.IntentData;
20
21import 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 */
29public 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 Milkeyfd7931d2015-03-30 13:58:38 -070041 * @param toUninstall Intent data describing flows to uninstall. May be null.
42 * @param toInstall Intent data describing flows to install. May be null.
Sho SHIMIZUb0a47d42015-02-19 13:26:30 -080043 */
Ray Milkeyfd7931d2015-03-30 13:58:38 -070044 void apply(IntentData toUninstall, IntentData toInstall);
Sho SHIMIZUb0a47d42015-02-19 13:26:30 -080045}