Sho SHIMIZU | 113c027 | 2014-07-22 22:07:26 -0700 | [diff] [blame^] | 1 | package net.onrc.onos.api.intent; |
| 2 | |
| 3 | import 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 | */ |
| 13 | public 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 | } |