public final class FromJsonUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getEchoRequestStr(com.fasterxml.jackson.databind.JsonNode jsonNode)
Ovs send echo request to keep the heart, need we return echo result.
|
static void |
jsonCallbackRequestParser(com.fasterxml.jackson.databind.JsonNode jsonNode,
Callback callback)
When monitor the ovsdb tables, if a table update, ovs send update
notification, then call callback function.
|
static DatabaseSchema |
jsonNodeToDbSchema(String dbName,
com.fasterxml.jackson.databind.JsonNode dbJson)
convert JsonNode into DatabaseSchema.
|
static List<OperationResult> |
jsonNodeToOperationResult(List<com.fasterxml.jackson.databind.JsonNode> input,
List<Operation> operations)
Convert the List of Operation result into List of OperationResult .
|
static TableUpdate |
jsonNodeToTableUpdate(TableSchema tableSchema,
com.fasterxml.jackson.databind.JsonNode updateJson)
convert the params of Update Notification into TableUpdate.
|
static TableUpdates |
jsonNodeToTableUpdates(com.fasterxml.jackson.databind.JsonNode updatesJson,
DatabaseSchema dbSchema)
convert the params of Update Notification into TableUpdates.
|
static Object |
jsonResultParser(com.fasterxml.jackson.databind.JsonNode jsonNode,
String methodName)
convert JsonNode into the returnType of methods in OvsdbRPC class.
|
public static DatabaseSchema jsonNodeToDbSchema(String dbName, com.fasterxml.jackson.databind.JsonNode dbJson)
dbName - database namedbJson - the JsonNode of get_schema resultAbnormalJsonNodeException - this is an abnormal JsonNode exceptionpublic static Object jsonResultParser(com.fasterxml.jackson.databind.JsonNode jsonNode, String methodName)
jsonNode - the result JsonNodemethodName - the method name of methods in OvsdbRPC classpublic static void jsonCallbackRequestParser(com.fasterxml.jackson.databind.JsonNode jsonNode,
Callback callback)
jsonNode - the result JsonNodecallback - the callback functionUnsupportedException - this is an unsupported exceptionpublic static String getEchoRequestStr(com.fasterxml.jackson.databind.JsonNode jsonNode)
jsonNode - the result JsonNodepublic static List<OperationResult> jsonNodeToOperationResult(List<com.fasterxml.jackson.databind.JsonNode> input, List<Operation> operations)
input - the List of JsonNodeoperations - the List of Operationpublic static TableUpdates jsonNodeToTableUpdates(com.fasterxml.jackson.databind.JsonNode updatesJson, DatabaseSchema dbSchema)
updatesJson - the params of Update NotificationdbSchema - DatabaseSchema entitypublic static TableUpdate jsonNodeToTableUpdate(TableSchema tableSchema, com.fasterxml.jackson.databind.JsonNode updateJson)
tableSchema - TableSchema entityupdateJson - the table-update in params of Update Notification