blob: 44ef6c3908e06307000bf35953d9aeffd798e557 [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/**
Ray Milkeyb41100a2014-04-10 10:42:15 -07004 * 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 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070020 * Default constructor for Kryo deserialization.
Ray Milkey269ffb92014-04-03 14:43:30 -070021 */
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}