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 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 4 | * This class is instantiated by Run-times to express intent calculation error. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 5 | * |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 6 | * @author Toshio Koide (t-koide@onlab.us) |
| 7 | */ |
| 8 | public class ErrorIntent extends Intent { |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 9 | public enum ErrorType { |
| 10 | UNSUPPORTED_INTENT, |
| 11 | SWITCH_NOT_FOUND, |
| 12 | PATH_NOT_FOUND, |
| 13 | } |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 14 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 15 | public ErrorType errorType; |
| 16 | public String message; |
| 17 | public Intent parentIntent; |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 18 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 19 | /** |
Ray Milkey | b41100a | 2014-04-10 10:42:15 -0700 | [diff] [blame] | 20 | * Default constructor for Kryo deserialization. |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 21 | */ |
| 22 | protected ErrorIntent() { |
| 23 | } |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 24 | |
Ray Milkey | 269ffb9 | 2014-04-03 14:43:30 -0700 | [diff] [blame] | 25 | public ErrorIntent(ErrorType errorType, String message, Intent parentIntent) { |
| 26 | super(parentIntent.getId()); |
| 27 | this.errorType = errorType; |
| 28 | this.message = message; |
| 29 | this.parentIntent = parentIntent; |
| 30 | } |
Toshio Koide | df2eab9 | 2014-02-20 11:24:59 -0800 | [diff] [blame] | 31 | } |