blob: 31715a802b28feccfec434b80def285a49c9e029 [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
Ray Milkey269ffb92014-04-03 14:43:30 -07005 *
Toshio Koidedf2eab92014-02-20 11:24:59 -08006 * @author Toshio Koide (t-koide@onlab.us)
7 */
8public class ErrorIntent extends Intent {
Ray Milkey269ffb92014-04-03 14:43:30 -07009 public enum ErrorType {
10 UNSUPPORTED_INTENT,
11 SWITCH_NOT_FOUND,
12 PATH_NOT_FOUND,
13 }
Toshio Koidedf2eab92014-02-20 11:24:59 -080014
Ray Milkey269ffb92014-04-03 14:43:30 -070015 public ErrorType errorType;
16 public String message;
17 public Intent parentIntent;
Toshio Koidedf2eab92014-02-20 11:24:59 -080018
Ray Milkey269ffb92014-04-03 14:43:30 -070019 /**
20 * Default constructor for Kryo deserialization
21 */
22 protected ErrorIntent() {
23 }
Toshio Koidedf2eab92014-02-20 11:24:59 -080024
Ray Milkey269ffb92014-04-03 14:43:30 -070025 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 Koidedf2eab92014-02-20 11:24:59 -080031}