Jonathan Hart
Committed by Gerrit Code Review

Remove default methods from IntentService interface.

Change-Id: Ie0ef999d7237a8e150e770a912c0fcbcd0c56adc
......@@ -16,7 +16,6 @@
package org.onosproject.net.intent;
import java.util.Collections;
import java.util.List;
/**
......@@ -83,19 +82,22 @@ public interface IntentService {
*/
List<Intent> getInstallableIntents(Key intentKey);
// TODO remove defaults
default boolean isLocal(Key intentKey) {
return true;
}
/**
* Signifies whether the local node is responsible for processing the given
* intent key.
*
* @param intentKey intent key to check
* @return true if the local node is responsible for the intent key,
* otherwise false
*/
boolean isLocal(Key intentKey);
/**
* Returns the list of intent requests pending processing.
*
* @return intents pending processing
*/
default Iterable<Intent> getPending() {
return Collections.emptyList();
}
Iterable<Intent> getPending();
/**
* Adds the specified listener for intent events.
......
......@@ -211,6 +211,16 @@ public class FakeIntentManager implements TestableIntentService {
}
@Override
public boolean isLocal(Key intentKey) {
return true;
}
@Override
public Iterable<Intent> getPending() {
return Collections.emptyList();
}
@Override
public void addListener(IntentListener listener) {
listeners.add(listener);
}
......
......@@ -58,6 +58,16 @@ public class IntentServiceAdapter implements IntentService {
}
@Override
public boolean isLocal(Key intentKey) {
return false;
}
@Override
public Iterable<Intent> getPending() {
return null;
}
@Override
public void addListener(IntentListener listener) {
}
......