blob: a5046e8b711e867a75dda50b5f92385b2d0e4516 [file] [log] [blame]
Jonathan Hartaa380972014-04-03 10:24:46 -07001package net.onrc.onos.core.intent;
Toshio Koidedf2eab92014-02-20 11:24:59 -08002
3/**
4 * This class is instantiated by Run-times to express intent calculation error
5 * @author Toshio Koide (t-koide@onlab.us)
6 */
7public 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 Koidea10c0372014-02-20 17:28:10 -080025 super(parentIntent.getId());
Toshio Koidedf2eab92014-02-20 11:24:59 -080026 this.errorType = errorType;
27 this.message = message;
28 this.parentIntent = parentIntent;
29 }
30}