Provisions traffic between end-stations using hop-by-hop flow programming by intercepting packets for which there are currently no matching flow objectives on the data plane. The paths paved in this manner are short-lived, i.e. they expire a few seconds after the flow on whose behalf they were programmed stops. The application relies on the ONOS path service to compute the shortest paths. In the event of negative topology events (link loss, device disconnect, etc.), the application will proactively invalidate any paths that it had programmed to lead through the resources that are no longer available.
publicclassMacAddressCompleterimplementsCompleter{ @Override publicintcomplete(String buffer, int cursor, List<String> candidates){ // Delegate string completer StringsCompleter delegate = new StringsCompleter(); EventuallyConsistentMap<MacAddress, ReactiveForwardMetrics> macAddress; // Fetch our service and feed it's offerings to the string completer ReactiveForwarding reactiveForwardingService = AbstractShellCommand.get(ReactiveForwarding.class); macAddress = reactiveForwardingService.getMacAddress(); SortedSet<String> strings = delegate.getStrings(); for (MacAddress key : macAddress.keySet()) { strings.add(key.toString()); } // Now let the completer do the work for figuring out what to offer. return delegate.complete(buffer, cursor, candidates); } }