blob: a27cc57aff3bc828112cc48121cdb42c7f659f2b [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 *
Sho SHIMIZU9beddc02014-08-04 11:32:11 -07008 * <p>
Sho SHIMIZU113c0272014-07-22 22:07:26 -07009 * IntentResolvers are registered to {@link IIntentRuntimeService} to handle translations of intents
10 * (we call it intent resolution).
Sho SHIMIZU9beddc02014-08-04 11:32:11 -070011 * </p>
Sho SHIMIZU113c0272014-07-22 22:07:26 -070012 *
13 * @param <T> the type of intent this resolver translates
14 */
15public interface IntentResolver<T extends Intent> {
16 /**
17 * Returns lower level intents, into which the given intent is translated.
18 *
19 * This method is invoked by the Intent Framework when the framework find an unresolved intent.
20 *
21 * @param intent the intent to be translated.
22 * @return lower level intents, into which the given intent is translated.
23 * @throws IntentResolutionException if this method can't resolve the intent.
24 */
25 public List<Intent> resolve(T intent) throws IntentResolutionException;
26}