Brian O'Connor
Committed by Thomas Vachuska

Refactoring addProcessor() calls to use type methods

Change-Id: Ib38cc5122a9d9a8cbaafec593eb3eb32a795a28f
...@@ -204,7 +204,7 @@ public class AAA { ...@@ -204,7 +204,7 @@ public class AAA {
204 // "org.onosproject.aaa" is the FQDN of our app 204 // "org.onosproject.aaa" is the FQDN of our app
205 appId = coreService.registerApplication("org.onosproject.aaa"); 205 appId = coreService.registerApplication("org.onosproject.aaa");
206 // register our event handler 206 // register our event handler
207 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 2); 207 + packetService.addProcessor(processor, PacketProcessor.director(2));
208 requestIntercepts(); 208 requestIntercepts();
209 // Instantiate the map of the state machines 209 // Instantiate the map of the state machines
210 stateMachineMap = Collections.synchronizedMap(Maps.newHashMap()); 210 stateMachineMap = Collections.synchronizedMap(Maps.newHashMap());
......
...@@ -53,7 +53,7 @@ public class IcmpHandler { ...@@ -53,7 +53,7 @@ public class IcmpHandler {
53 } 53 }
54 54
55 public void start() { 55 public void start() {
56 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 4); 56 + packetService.addProcessor(processor, PacketProcessor.director(4));
57 } 57 }
58 58
59 public void stop() { 59 public void stop() {
......
...@@ -84,7 +84,7 @@ public class TunnellingConnectivityManager { ...@@ -84,7 +84,7 @@ public class TunnellingConnectivityManager {
84 } 84 }
85 85
86 public void start() { 86 public void start() {
87 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 3); 87 + packetService.addProcessor(processor, PacketProcessor.director(3));
88 } 88 }
89 89
90 public void stop() { 90 public void stop() {
......
...@@ -187,7 +187,7 @@ public class ReactiveForwarding { ...@@ -187,7 +187,7 @@ public class ReactiveForwarding {
187 cfgService.registerProperties(getClass()); 187 cfgService.registerProperties(getClass());
188 appId = coreService.registerApplication("org.onosproject.fwd"); 188 appId = coreService.registerApplication("org.onosproject.fwd");
189 189
190 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 2); 190 + packetService.addProcessor(processor, PacketProcessor.director(2));
191 topologyService.addListener(topologyListener); 191 topologyService.addListener(topologyListener);
192 readComponentConfiguration(context); 192 readComponentConfiguration(context);
193 requestIntercepts(); 193 requestIntercepts();
......
...@@ -80,7 +80,7 @@ public class ProxyArp { ...@@ -80,7 +80,7 @@ public class ProxyArp {
80 cfgService.registerProperties(getClass()); 80 cfgService.registerProperties(getClass());
81 appId = coreService.registerApplication("org.onosproject.proxyarp"); 81 appId = coreService.registerApplication("org.onosproject.proxyarp");
82 82
83 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 1); 83 + packetService.addProcessor(processor, PacketProcessor.director(1));
84 readComponentConfiguration(context); 84 readComponentConfiguration(context);
85 requestPackests(); 85 requestPackests();
86 86
......
...@@ -84,7 +84,7 @@ public class SdnIpReactiveRouting { ...@@ -84,7 +84,7 @@ public class SdnIpReactiveRouting {
84 @Activate 84 @Activate
85 public void activate() { 85 public void activate() {
86 appId = coreService.registerApplication(APP_NAME); 86 appId = coreService.registerApplication(APP_NAME);
87 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 2); 87 + packetService.addProcessor(processor, PacketProcessor.director(2));
88 requestIntercepts(); 88 requestIntercepts();
89 log.info("SDN-IP Reactive Routing Started"); 89 log.info("SDN-IP Reactive Routing Started");
90 } 90 }
......
...@@ -204,7 +204,7 @@ public class SegmentRoutingManager implements SegmentRoutingService { ...@@ -204,7 +204,7 @@ public class SegmentRoutingManager implements SegmentRoutingService {
204 policyHandler = new PolicyHandler(appId, deviceConfiguration, 204 policyHandler = new PolicyHandler(appId, deviceConfiguration,
205 flowObjectiveService, tunnelHandler, policyStore); 205 flowObjectiveService, tunnelHandler, policyStore);
206 206
207 - packetService.addProcessor(processor, PacketProcessor.ADVISOR_MAX + 2); 207 + packetService.addProcessor(processor, PacketProcessor.director(2));
208 linkService.addListener(new InternalLinkListener()); 208 linkService.addListener(new InternalLinkListener());
209 deviceService.addListener(new InternalDeviceListener()); 209 deviceService.addListener(new InternalDeviceListener());
210 210
......
...@@ -79,8 +79,7 @@ public class VirtualPublicHosts { ...@@ -79,8 +79,7 @@ public class VirtualPublicHosts {
79 public void activate() { 79 public void activate() {
80 appId = coreService.registerApplication(APP_NAME); 80 appId = coreService.registerApplication(APP_NAME);
81 81
82 - packetService.addProcessor(processor, 82 + packetService.addProcessor(processor, PacketProcessor.director(6));
83 - PacketProcessor.ADVISOR_MAX + 6);
84 requestIntercepts(); 83 requestIntercepts();
85 log.info("vBNG virtual public hosts started"); 84 log.info("vBNG virtual public hosts started");
86 } 85 }
......
...@@ -130,7 +130,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid ...@@ -130,7 +130,7 @@ public class HostLocationProvider extends AbstractProvider implements HostProvid
130 appId = coreService.registerApplication("org.onosproject.provider.host"); 130 appId = coreService.registerApplication("org.onosproject.provider.host");
131 131
132 providerService = providerRegistry.register(this); 132 providerService = providerRegistry.register(this);
133 - packetService.addProcessor(processor, 1); 133 + packetService.addProcessor(processor, PacketProcessor.advisor(1));
134 deviceService.addListener(deviceListener); 134 deviceService.addListener(deviceListener);
135 readComponentConfiguration(context); 135 readComponentConfiguration(context);
136 requestIntercepts(); 136 requestIntercepts();
......
...@@ -151,7 +151,7 @@ public class LLDPLinkProvider extends AbstractProvider implements LinkProvider { ...@@ -151,7 +151,7 @@ public class LLDPLinkProvider extends AbstractProvider implements LinkProvider {
151 151
152 providerService = providerRegistry.register(this); 152 providerService = providerRegistry.register(this);
153 deviceService.addListener(listener); 153 deviceService.addListener(listener);
154 - packetService.addProcessor(listener, 0); 154 + packetService.addProcessor(listener, PacketProcessor.advisor(0));
155 masterService.addListener(roleListener); 155 masterService.addListener(roleListener);
156 156
157 LinkDiscovery ld; 157 LinkDiscovery ld;
......