@Test public void getFlowEntries() { assertTrue("store should be empty", Sets.newHashSet(service.getFlowEntries(DID)).isEmpty()); FlowRule f1 = addFlowRule(1); FlowRule f2 = addFlowRule(2); FlowEntry fe1 = new DefaultFlowEntry(f1); FlowEntry fe2 = new DefaultFlowEntry(f2); assertEquals("2 rules should exist", 2, flowCount()); providerService.pushFlowMetrics(DID, ImmutableList.of(fe1, fe2)); validateEvents(RULE_ADD_REQUESTED, RULE_ADD_REQUESTED, RULE_ADDED, RULE_ADDED); addFlowRule(1); System.err.println("events :" + listener.events); assertEquals("should still be 2 rules", 2, flowCount()); providerService.pushFlowMetrics(DID, ImmutableList.of(fe1)); validateEvents(RULE_UPDATED, RULE_UPDATED); }
@Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); return store.getFlowEntries(deviceId); }
FlowRuleManager extends AbstractListenerProviderRegistry<FlowRuleEvent, FlowRuleListener,
                                                 FlowRuleProvider, FlowRuleProviderService> implements FlowRuleService, FlowRuleProviderRegistry { @Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); return store.getFlowEntries(deviceId); } }
FlowRuleManager extends AbstractListenerProviderRegistry<FlowRuleEvent, FlowRuleListener,
                                                 FlowRuleProvider, FlowRuleProviderService> implements FlowRuleService, FlowRuleProviderRegistry { @Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); return store.getFlowEntries(deviceId); }  }
FlowRuleManager extends AbstractListenerProviderRegistry<FlowRuleEvent, FlowRuleListener,
                                                 FlowRuleProvider, FlowRuleProviderService> implements FlowRuleService, FlowRuleProviderRegistry { @Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); return store.getFlowEntries(deviceId); }  @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override int getFlowRuleCount(); @Override Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); @Override void applyFlowRules(FlowRule... flowRules); @Override void removeFlowRules(FlowRule... flowRules); @Override void removeFlowRulesById(ApplicationId id); @Override Iterable<FlowRule> getFlowRulesById(ApplicationId id); @Override Iterable<FlowRule> getFlowRulesByGroupId(ApplicationId appId, short groupId); @Override void apply(FlowRuleOperations ops); @Override Iterable<TableStatisticsEntry> getFlowTableStatistics(DeviceId deviceId); }
FlowRuleManager extends AbstractListenerProviderRegistry<FlowRuleEvent, FlowRuleListener,
                                                 FlowRuleProvider, FlowRuleProviderService> implements FlowRuleService, FlowRuleProviderRegistry { @Override public Iterable<FlowEntry> getFlowEntries(DeviceId deviceId) { checkPermission(FLOWRULE_READ); return store.getFlowEntries(deviceId); }  @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override int getFlowRuleCount(); @Override Iterable<FlowEntry> getFlowEntries(DeviceId deviceId); @Override void applyFlowRules(FlowRule... flowRules); @Override void removeFlowRules(FlowRule... flowRules); @Override void removeFlowRulesById(ApplicationId id); @Override Iterable<FlowRule> getFlowRulesById(ApplicationId id); @Override Iterable<FlowRule> getFlowRulesByGroupId(ApplicationId appId, short groupId); @Override void apply(FlowRuleOperations ops); @Override Iterable<TableStatisticsEntry> getFlowTableStatistics(DeviceId deviceId); static final String FLOW_RULE_NULL; }