blob: a27cc57aff3bc828112cc48121cdb42c7f659f2b [file] [log] [blame]
package net.onrc.onos.api.intent;
import java.util.List;
/**
* An interface to translate an intent to lower level intents.
*
* <p>
* IntentResolvers are registered to {@link IIntentRuntimeService} to handle translations of intents
* (we call it intent resolution).
* </p>
*
* @param <T> the type of intent this resolver translates
*/
public interface IntentResolver<T extends Intent> {
/**
* Returns lower level intents, into which the given intent is translated.
*
* This method is invoked by the Intent Framework when the framework find an unresolved intent.
*
* @param intent the intent to be translated.
* @return lower level intents, into which the given intent is translated.
* @throws IntentResolutionException if this method can't resolve the intent.
*/
public List<Intent> resolve(T intent) throws IntentResolutionException;
}