Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.JsonNode.asLong()


                if (value.isNull()) {
                    tree.removeProperty(name);
                } else if (value.isBoolean()) {
                    tree.setProperty(name, vf.createValue(value.asBoolean()));
                } else if (value.isLong()) {
                    tree.setProperty(name, vf.createValue(value.asLong()));
                } else if (value.isDouble()) {
                    tree.setProperty(name, vf.createValue(value.asDouble()));
                } else if (value.isBigDecimal()) {
                    tree.setProperty(name, vf.createValue(value.decimalValue()));
                } else {
View Full Code Here


        {
            return jsonNode.asDouble();
        }
        if( jsonNode.isLong() )
        {
            return jsonNode.asLong();
        }
        if( jsonNode.isInt() )
        {
            return jsonNode.asInt();
        }
View Full Code Here

                if (value.isNull()) {
                    tree.removeProperty(name);
                } else if (value.isBoolean()) {
                    tree.setProperty(name, value.asBoolean());
                } else if (value.isLong()) {
                    tree.setProperty(name, value.asLong());
                } else if (value.isDouble()) {
                    tree.setProperty(name, value.asDouble());
                } else if (value.isBigDecimal()) {
                    tree.setProperty(name, value.decimalValue());
                } else {
View Full Code Here

        if (newDBSize!=null && !newDBSize.isLong() && newDBSize.asInt()<0) throw new IllegalArgumentException(BBConfiguration.DB_SIZE_THRESHOLD + " must be a positive integer value, or 0 to disable it");
      }catch (Throwable e){
        return badRequest(e.getMessage());
      }
      if (newDBAlert!=null) BBConfiguration.setDBAlertThreshold(newDBAlert.asInt());
      if (newDBSize!=null) BBConfiguration.setDBSizeThreshold(BigInteger.valueOf(newDBSize.asLong()));
      HashMap returnMap = new HashMap();
      returnMap.put(BBConfiguration.DB_ALERT_THRESHOLD, BBConfiguration.getDBAlertThreshold());
      returnMap.put(BBConfiguration.DB_SIZE_THRESHOLD, BBConfiguration.getDBSizeThreshold());
      try {
        return ok(new ObjectMapper().writeValueAsString(returnMap));
View Full Code Here

        if (sockjsUrl != null) {
            builder.sockJsUrl(sockjsUrl.asText());
        }
        final JsonNode sessionTimeout = json.get("sockjs-session-timeout");
        if (sessionTimeout != null) {
            builder.sessionTimeout(sessionTimeout.asLong());
        }
        final JsonNode heartbeatInterval = json.get("sockjs-heartbeat-interval");
        if (heartbeatInterval != null) {
            builder.heartbeatInterval(heartbeatInterval.asLong());
        }
View Full Code Here

        if (sessionTimeout != null) {
            builder.sessionTimeout(sessionTimeout.asLong());
        }
        final JsonNode heartbeatInterval = json.get("sockjs-heartbeat-interval");
        if (heartbeatInterval != null) {
            builder.heartbeatInterval(heartbeatInterval.asLong());
        }
        final JsonNode maxStreamingBytesSize = json.get("sockjs-max-streaming-bytes-size");
        if (maxStreamingBytesSize != null) {
            builder.maxStreamingBytesSize(maxStreamingBytesSize.asInt());
        }
View Full Code Here

        if (websocketEnable != null && !websocketEnable.asBoolean()) {
            builder.disableWebSocket();
        }
        final JsonNode websocketHeartbeatInterval = json.get("sockjs-websocket-heartbeat-interval");
        if (websocketHeartbeatInterval != null) {
            builder.webSocketHeartbeatInterval(websocketHeartbeatInterval.asLong());
        }
        final JsonNode websocketProtocols = json.get("sockjs-websocket-protocols");
        if (websocketProtocols != null) {
            builder.webSocketProtocols(websocketProtocols.asText().split(","));
        }
View Full Code Here

        if (password != null) {
            builder.password(password.asText());
        }
        final JsonNode useragentReaperTimeout = json.get("useragent-reaper-timeout");
        if (useragentReaperTimeout != null) {
            builder.userAgentReaperTimeout(useragentReaperTimeout.asLong());
        }
        final JsonNode endpointHost = json.get("endpoint-host");
        if (endpointHost != null) {
            builder.endpointHost(endpointHost.asText());
        }
View Full Code Here

        if (endpointPrefix != null) {
            builder.endpointPrefix(endpointPrefix.asText());
        }
        final JsonNode ackInterval = json.get("ack-interval");
        if (ackInterval != null) {
            builder.ackInterval(ackInterval.asLong());
        }
        final JsonNode notifierMaxThreads = json.get("notifier-max-threads");
        if (notifierMaxThreads != null) {
            builder.notifierMaxThreads(notifierMaxThreads.asInt());
        }
View Full Code Here

                    : node.isBoolean()
                    ? node.asBoolean()
                    : node.isDouble()
                    ? node.asDouble()
                    : node.isLong()
                    ? node.asLong()
                    : node.isInt()
                    ? node.asInt()
                    : node.asText();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.