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 | * |
Sho SHIMIZU | 9beddc0 | 2014-08-04 11:32:11 -0700 | [diff] [blame^] | 8 | * <p> |
Sho SHIMIZU | 113c027 | 2014-07-22 22:07:26 -0700 | [diff] [blame] | 9 | * IntentResolvers are registered to {@link IIntentRuntimeService} to handle translations of intents |
| 10 | * (we call it intent resolution). |
Sho SHIMIZU | 9beddc0 | 2014-08-04 11:32:11 -0700 | [diff] [blame^] | 11 | * </p> |
Sho SHIMIZU | 113c027 | 2014-07-22 22:07:26 -0700 | [diff] [blame] | 12 | * |
| 13 | * @param <T> the type of intent this resolver translates |
| 14 | */ |
| 15 | public 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 | } |