Package com.fasterxml.jackson.databind

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


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


    }

    private static SimplePushServerConfig parseSimplePushProperties(final JsonNode json) {
        final JsonNode host = json.get("host");
        final JsonNode port = json.get("port");
        final Builder builder = DefaultSimplePushConfig.create(host.asText(), port.asInt());
        final JsonNode password = json.get("password");
        if (password != null) {
            builder.password(password.asText());
        }
        final JsonNode useragentReaperTimeout = json.get("useragent-reaper-timeout");
View Full Code Here

        if (endpointHost != null) {
            builder.endpointHost(endpointHost.asText());
        }
        final JsonNode endpointPort = json.get("endpoint-port");
        if (endpointPort != null) {
            builder.endpointPort(endpointPort.asInt());
        }
        final JsonNode endpointTls = json.get("endpoint-tls");
        if (endpointTls != null) {
            builder.endpointTls(endpointTls.asBoolean());
        }
View Full Code Here

        if (ackInterval != null) {
            builder.ackInterval(ackInterval.asLong());
        }
        final JsonNode notifierMaxThreads = json.get("notifier-max-threads");
        if (notifierMaxThreads != null) {
            builder.notifierMaxThreads(notifierMaxThreads.asInt());
        }
        return builder.build();
    }

}
View Full Code Here

        JsonNode major = version.get("Major");
        if (major == null || !major.isNumber()) {
            throw new IllegalStateException("No Major version found");
        }

        int majorVersion = major.asInt();

        switch (majorVersion) {
        case 1:
            return new ModelLoader(loadV1Model(tree, version));
View Full Code Here

        JsonNode minor = version.get("Minor");
        if (minor == null || !minor.isNumber()) {
            throw new IllegalStateException("No Minor version found");
        }
        if (minor.asInt() < 0) {
            throw new IllegalStateException("Invalid minor version: "
                    + minor.asInt());
        }

        if (minor.asInt() > LATEST_V1_MINOR_VERSION) {
View Full Code Here

        if (minor == null || !minor.isNumber()) {
            throw new IllegalStateException("No Minor version found");
        }
        if (minor.asInt() < 0) {
            throw new IllegalStateException("Invalid minor version: "
                    + minor.asInt());
        }

        if (minor.asInt() > LATEST_V1_MINOR_VERSION) {
            throw new IllegalStateException(
                    "Unknown minor version " + minor.asInt() + ". Perhaps "
View Full Code Here

        if (minor.asInt() < 0) {
            throw new IllegalStateException("Invalid minor version: "
                    + minor.asInt());
        }

        if (minor.asInt() > LATEST_V1_MINOR_VERSION) {
            throw new IllegalStateException(
                    "Unknown minor version " + minor.asInt() + ". Perhaps "
                    + "you need a newer version of the resources runtime?");
        }
View Full Code Here

                    + minor.asInt());
        }

        if (minor.asInt() > LATEST_V1_MINOR_VERSION) {
            throw new IllegalStateException(
                    "Unknown minor version " + minor.asInt() + ". Perhaps "
                    + "you need a newer version of the resources runtime?");
        }

        JsonNode service = tree.get("Service");
        if (service == null) {
View Full Code Here

                    : node.isDouble()
                    ? node.asDouble()
                    : node.isLong()
                    ? node.asLong()
                    : node.isInt()
                    ? node.asInt()
                    : node.asText();
        }

        return new SyncToken(value);
    }
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.