blob: 1f13cdca530bb36f2bd6caa21eff29269ddc70c9 [file] [log] [blame]
Sho SHIMIZU113c0272014-07-22 22:07:26 -07001package net.onrc.onos.api.intent;
2
3import java.util.List;
4
5/**
6 * An interface to translate an intent to lower level intents.
7 *
8 * IntentResolvers are registered to {@link IIntentRuntimeService} to handle translations of intents
9 * (we call it intent resolution).
10 *
11 * @param <T> the type of intent this resolver translates
12 */
13public interface IntentResolver<T extends Intent> {
14 /**
15 * Returns lower level intents, into which the given intent is translated.
16 *
17 * This method is invoked by the Intent Framework when the framework find an unresolved intent.
18 *
19 * @param intent the intent to be translated.
20 * @return lower level intents, into which the given intent is translated.
21 * @throws IntentResolutionException if this method can't resolve the intent.
22 */
23 public List<Intent> resolve(T intent) throws IntentResolutionException;
24}