blob: 33653502c1e2467e966472a6c51d52dfaf9653c4 [file] [log] [blame]
Toshio Koidedf2eab92014-02-20 11:24:59 -08001package net.onrc.onos.intent;
2
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) {
25 this.id = parentIntent.getId();
26 this.errorType = errorType;
27 this.message = message;
28 this.parentIntent = parentIntent;
29 }
30}