public final class IntentCodec
extends org.onosproject.codec.JsonCodec<org.onosproject.net.intent.Intent>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
APP_ID |
protected static String |
ID |
protected static String |
MISSING_MEMBER_MESSAGE |
protected static String |
PRIORITY |
protected static String |
RESOURCE_GROUP |
protected static String |
RESOURCES |
protected static String |
STATE |
protected static String |
TYPE |
| Constructor and Description |
|---|
IntentCodec() |
| Modifier and Type | Method and Description |
|---|---|
org.onosproject.net.intent.Intent |
decode(com.fasterxml.jackson.databind.node.ObjectNode json,
org.onosproject.codec.CodecContext context) |
com.fasterxml.jackson.databind.node.ObjectNode |
encode(org.onosproject.net.intent.Intent intent,
org.onosproject.codec.CodecContext context) |
static void |
intentAttributes(com.fasterxml.jackson.databind.node.ObjectNode json,
org.onosproject.codec.CodecContext context,
org.onosproject.net.intent.Intent.Builder builder)
Extracts base intent specific attributes from a JSON object
and adds them to a builder.
|
protected static final String TYPE
protected static final String ID
protected static final String APP_ID
protected static final String STATE
protected static final String PRIORITY
protected static final String RESOURCES
protected static final String RESOURCE_GROUP
protected static final String MISSING_MEMBER_MESSAGE
public com.fasterxml.jackson.databind.node.ObjectNode encode(org.onosproject.net.intent.Intent intent,
org.onosproject.codec.CodecContext context)
encode in class org.onosproject.codec.JsonCodec<org.onosproject.net.intent.Intent>public org.onosproject.net.intent.Intent decode(com.fasterxml.jackson.databind.node.ObjectNode json,
org.onosproject.codec.CodecContext context)
decode in class org.onosproject.codec.JsonCodec<org.onosproject.net.intent.Intent>public static void intentAttributes(com.fasterxml.jackson.databind.node.ObjectNode json,
org.onosproject.codec.CodecContext context,
org.onosproject.net.intent.Intent.Builder builder)
json - root JSON objectcontext - code contextbuilder - builder to use for storing the attributes