Leftover follow-up commit for "1c8f47754241fea8b9c1463c08539ec31638a5de":
* Use the "@JsonProperty()" annotation to serialize/deserialize
objects that don't require any specialized processing.
Use "@JsonSerialize" and "@JsonDeserialize" only for objects
that need more specialized processing.
* Remove FooSerializer JSON classes that are not used/needed anymore.
* Update the implementation of remaining FooSerializer classes,
and associated Foo classes.
diff --git a/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java b/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
index f9ca8ba..bf1708d 100644
--- a/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
+++ b/src/main/java/net/floodlightcontroller/util/FlowEntryErrorState.java
@@ -1,14 +1,10 @@
package net.floodlightcontroller.util;
-import net.floodlightcontroller.util.serializers.FlowEntryErrorStateSerializer;
-
import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
/**
* The class representing the Flow Entry error state.
*/
-@JsonSerialize(using=FlowEntryErrorStateSerializer.class)
public class FlowEntryErrorState {
private short type; // The error type (e.g., see OF-1.3.1 spec, pp. 95)
private short code; // The error code (e.g., see OF-1.3.1 spec, pp. 95)
@@ -37,16 +33,38 @@
*
* @return the error type.
*/
+ @JsonProperty("type")
public short type() { return type; }
/**
+ * Set the error type.
+ *
+ * @param type the error type to use.
+ */
+ @JsonProperty("type")
+ public void setType(short type) {
+ this.type = type;
+ }
+
+ /**
* Get the error code.
*
* @return the error code.
*/
+ @JsonProperty("code")
public short code() { return code; }
/**
+ * Set the error code.
+ *
+ * @param code the error code to use.
+ */
+ @JsonProperty("code")
+ public void setCode(short code) {
+ this.code = code;
+ }
+
+ /**
* Set the values of the error type and code.
*
* @param type the error type to use.