public class JsonUtils extends Object
Constructor and Description |
---|
JsonUtils() |
Modifier and Type | Method and Description |
---|---|
static <T> JsonRpcResponse |
buildErrorResponse(org.codehaus.jackson.JsonNode id,
T code,
String message) |
static JsonRpcResponse |
buildFailedResponse(JsonRpcRequest request) |
static ByteBuffer |
cloneBuffer(ByteBuffer original) |
static String |
getAddress(String host,
int port) |
static long |
getTimeout(int timeout,
TimeUnit unit) |
static boolean |
isEmpty(String value) |
static byte[] |
jsonToByteArray(org.codehaus.jackson.JsonNode json) |
static byte[] |
jsonToByteArray(List<JsonRpcRequest> requests) |
static void |
logException(org.apache.commons.logging.Log logger,
String message,
Throwable throwable) |
static Map<String,Object> |
mapValues(org.codehaus.jackson.JsonNode node) |
static int |
reduceGracePeriod(int interval) |
public static final Charset UTF8
public static byte[] jsonToByteArray(org.codehaus.jackson.JsonNode json)
public static byte[] jsonToByteArray(List<JsonRpcRequest> requests)
public static <T> JsonRpcResponse buildErrorResponse(org.codehaus.jackson.JsonNode id, T code, String message)
public static JsonRpcResponse buildFailedResponse(JsonRpcRequest request)
public static ByteBuffer cloneBuffer(ByteBuffer original)
public static boolean isEmpty(String value)
public static int reduceGracePeriod(int interval)
public static long getTimeout(int timeout, TimeUnit unit)
Copyright © 2015. All Rights Reserved.