Committed by
Brian O'Connor
Ensure a CompletedIntentUpdate subclass is the final state
Change-Id: Icecf8a45fad7cb80f3953dcfc081c344d3fa0adb
Showing
5 changed files
with
7 additions
and
7 deletions
| ... | @@ -22,7 +22,7 @@ import static org.onosproject.net.intent.IntentState.FAILED; | ... | @@ -22,7 +22,7 @@ import static org.onosproject.net.intent.IntentState.FAILED; |
| 22 | /** | 22 | /** |
| 23 | * Represents a phase where the compile has failed. | 23 | * Represents a phase where the compile has failed. |
| 24 | */ | 24 | */ |
| 25 | -class CompilingFailed implements CompletedIntentUpdate { | 25 | +class CompilingFailed extends CompletedIntentUpdate { |
| 26 | 26 | ||
| 27 | private final IntentData intentData; | 27 | private final IntentData intentData; |
| 28 | 28 | ... | ... |
| ... | @@ -22,12 +22,12 @@ import java.util.Optional; | ... | @@ -22,12 +22,12 @@ import java.util.Optional; |
| 22 | /** | 22 | /** |
| 23 | * Represents a completed phase of processing an intent. | 23 | * Represents a completed phase of processing an intent. |
| 24 | */ | 24 | */ |
| 25 | -interface CompletedIntentUpdate extends IntentUpdate { | 25 | +abstract class CompletedIntentUpdate implements IntentUpdate { |
| 26 | 26 | ||
| 27 | @Override | 27 | @Override |
| 28 | - default Optional<IntentUpdate> execute() { | 28 | + public final Optional<IntentUpdate> execute() { |
| 29 | return Optional.empty(); | 29 | return Optional.empty(); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | - IntentData data(); | 32 | + public abstract IntentData data(); |
| 33 | } | 33 | } | ... | ... |
| ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; | ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; |
| 20 | import static com.google.common.base.Preconditions.checkNotNull; | 20 | import static com.google.common.base.Preconditions.checkNotNull; |
| 21 | import static org.onosproject.net.intent.IntentState.INSTALLING; | 21 | import static org.onosproject.net.intent.IntentState.INSTALLING; |
| 22 | 22 | ||
| 23 | -class Installed implements CompletedIntentUpdate { | 23 | +class Installed extends CompletedIntentUpdate { |
| 24 | 24 | ||
| 25 | private final IntentData intentData; | 25 | private final IntentData intentData; |
| 26 | 26 | ... | ... |
| ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; | ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; |
| 20 | import static com.google.common.base.Preconditions.checkNotNull; | 20 | import static com.google.common.base.Preconditions.checkNotNull; |
| 21 | import static org.onosproject.net.intent.IntentState.FAILED; | 21 | import static org.onosproject.net.intent.IntentState.FAILED; |
| 22 | 22 | ||
| 23 | -class InstallingFailed implements CompletedIntentUpdate { | 23 | +class InstallingFailed extends CompletedIntentUpdate { |
| 24 | 24 | ||
| 25 | private final IntentData intentData; | 25 | private final IntentData intentData; |
| 26 | 26 | ... | ... |
| ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; | ... | @@ -20,7 +20,7 @@ import org.onosproject.net.intent.IntentData; |
| 20 | import static com.google.common.base.Preconditions.checkNotNull; | 20 | import static com.google.common.base.Preconditions.checkNotNull; |
| 21 | import static org.onosproject.net.intent.IntentState.WITHDRAWING; | 21 | import static org.onosproject.net.intent.IntentState.WITHDRAWING; |
| 22 | 22 | ||
| 23 | -class Withdrawn implements CompletedIntentUpdate { | 23 | +class Withdrawn extends CompletedIntentUpdate { |
| 24 | 24 | ||
| 25 | private final IntentData intentData; | 25 | private final IntentData intentData; |
| 26 | 26 | ... | ... |
-
Please register or login to post a comment