Jonathan Hart | aa38097 | 2014-04-03 10:24:46 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.intent; |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 2 | |
| 3 | /** |
| 4 | * This class is instantiated by Run-times to express intent calculation error |
| 5 | * @author Toshio Koide (t-koide@onlab.us) |
| 6 | */ |
| 7 | public class ErrorIntent extends Intent { |
| 8 | public enum ErrorType { |
| 9 | UNSUPPORTED_INTENT, |
| 10 | SWITCH_NOT_FOUND, |
| 11 | PATH_NOT_FOUND, |
| 12 | } |
| 13 | |
| 14 | public ErrorType errorType; |
| 15 | public String message; |
| 16 | public Intent parentIntent; |
| 17 | |
| 18 | /** |
| 19 | * Default constructor for Kryo deserialization |
| 20 | */ |
| 21 | protected ErrorIntent() { |
| 22 | } |
| 23 | |
| 24 | public ErrorIntent(ErrorType errorType, String message, Intent parentIntent) { |
Toshio Koide | a10c037 | 2014-02-20 17:28:10 -0800 | [diff] [blame] | 25 | super(parentIntent.getId()); |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 26 | this.errorType = errorType; |
| 27 | this.message = message; |
| 28 | this.parentIntent = parentIntent; |
| 29 | } |
| 30 | } |