Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.newintent; |
| 2 | |
| 3 | import java.util.Collection; |
| 4 | import java.util.EventListener; |
| 5 | |
| 6 | import net.onrc.onos.api.batchoperation.BatchOperation; |
| 7 | import net.onrc.onos.api.flowmanager.ConflictDetectionPolicy; |
| 8 | import net.onrc.onos.api.flowmanager.IFlow; |
| 9 | import net.onrc.onos.api.intent.IIntentRuntimeService; |
| 10 | import net.onrc.onos.api.intent.Intent; |
Toshio Koide | 025a915 | 2014-07-21 11:00:34 -0700 | [diff] [blame] | 11 | import net.onrc.onos.api.intent.IntentId; |
Sho SHIMIZU | 308a45a | 2014-07-23 11:27:04 -0700 | [diff] [blame] | 12 | import net.onrc.onos.api.intent.IntentInstaller; |
Sho SHIMIZU | 113c027 | 2014-07-22 22:07:26 -0700 | [diff] [blame] | 13 | import net.onrc.onos.api.intent.IntentResolver; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 14 | |
| 15 | /** |
| 16 | * Implementation of Intent-Runtime Service. |
| 17 | * <p> |
| 18 | * TODO: Make all methods thread-safe. <br> |
| 19 | * TODO: Design methods to support the ReactiveForwarding and the SDN-IP. |
| 20 | */ |
| 21 | public class IntentRuntimeModule implements IIntentRuntimeService { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 22 | @Override |
Sho SHIMIZU | 68a052d | 2014-07-24 15:25:14 -0700 | [diff] [blame] | 23 | public boolean install(Intent intent) { |
| 24 | // TODO: implement this method |
| 25 | return false; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | @Override |
Sho SHIMIZU | 68a052d | 2014-07-24 15:25:14 -0700 | [diff] [blame] | 29 | public boolean remove(IntentId id) { |
| 30 | // TODO: implement this method |
| 31 | return false; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | @Override |
Toshio Koide | 025a915 | 2014-07-21 11:00:34 -0700 | [diff] [blame] | 35 | public Intent getIntent(IntentId id) { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 36 | // TODO Auto-generated method stub |
| 37 | // - retrieves intents from global distributed maps |
| 38 | return null; |
| 39 | } |
| 40 | |
| 41 | @Override |
| 42 | public Collection<Intent> getIntents() { |
| 43 | // TODO Auto-generated method stub |
| 44 | // - retrieves intents from global distributed maps |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public boolean executeBatch(BatchOperation<Intent> ops) { |
| 50 | // TODO Auto-generated method stub |
| 51 | // - gets flow operations using compile() method for each Intent object. |
| 52 | // - allocates resources |
| 53 | // - combines and executes flow operations using FlowManager Service. |
| 54 | // - updates global distributed maps |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | @Override |
Sho SHIMIZU | 113c027 | 2014-07-22 22:07:26 -0700 | [diff] [blame] | 59 | public <T extends Intent> void addResolver(Class<T> type, IntentResolver<T> resolver) { |
| 60 | //To change body of implemented methods use File | Settings | File Templates. |
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | public <T extends Intent> void removeResolver(Class<T> type) { |
| 65 | //To change body of implemented methods use File | Settings | File Templates. |
| 66 | } |
| 67 | |
| 68 | @Override |
Sho SHIMIZU | 308a45a | 2014-07-23 11:27:04 -0700 | [diff] [blame] | 69 | public <T extends Intent> boolean addInstaller(Class<T> type, IntentInstaller<T> installer) { |
| 70 | // TODO: implement this method |
| 71 | return false; |
| 72 | } |
| 73 | |
| 74 | @Override |
| 75 | public <T extends Intent> boolean removeInstaller(Class<T> type) { |
| 76 | // TODO: impelment this method |
| 77 | return false; |
| 78 | } |
| 79 | |
| 80 | @Override |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 81 | public Collection<IFlow> getFlows(String intentId) { |
| 82 | // TODO Auto-generated method stub |
| 83 | return null; |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public Intent getIntentByFlow(String flowId) { |
| 88 | // TODO Auto-generated method stub |
| 89 | return null; |
| 90 | } |
| 91 | |
| 92 | @Override |
| 93 | public void setConflictDetectionPolicy(ConflictDetectionPolicy policy) { |
| 94 | // TODO Auto-generated method stub |
| 95 | |
| 96 | } |
| 97 | |
| 98 | @Override |
| 99 | public ConflictDetectionPolicy getConflictDetectionPolicy() { |
| 100 | // TODO Auto-generated method stub |
| 101 | return null; |
| 102 | } |
| 103 | |
| 104 | @Override |
| 105 | public void addEventListener(EventListener listener) { |
| 106 | // TODO Auto-generated method stub |
| 107 | // - listener for addition/removal of intents, |
| 108 | // and states changes of intents |
| 109 | } |
| 110 | |
| 111 | @Override |
| 112 | public void removeEventListener(EventListener listener) { |
| 113 | // TODO Auto-generated method stub |
| 114 | |
| 115 | } |
| 116 | } |