Package org.vertx.java.core.json

Examples of org.vertx.java.core.json.JsonArray.toArray()


             * served from disk.
             */
              @Override
            public void handle(Message<JsonObject> event) {
              JsonArray resourceIdArr = event.body.getArray("resourceIds");
              Object[] resourceIds = resourceIdArr.toArray();
              String resourceId = (String) resourceIds[0];

              String currentPath = stripLeadingSlash(request.getPath());
              FileEditSession editSession = editSessions.get(resourceId);

View Full Code Here


    private List<URI> getHostsFromConfig(JsonObject config) throws URISyntaxException {
        List<URI> hosts = new ArrayList<>();

        JsonArray hostsAsArray = config.getArray("hosts", new JsonArray().addString("localhost"));
        String[] hostsAsString = Arrays.copyOf(hostsAsArray.toArray(), hostsAsArray.toArray().length, String[].class);
        for (String hostname : hostsAsString) {
            hosts.add(new URI("http://" + hostname + ":8091/pools"));
        }

        return hosts;
View Full Code Here

    private List<URI> getHostsFromConfig(JsonObject config) throws URISyntaxException {
        List<URI> hosts = new ArrayList<>();

        JsonArray hostsAsArray = config.getArray("hosts", new JsonArray().addString("localhost"));
        String[] hostsAsString = Arrays.copyOf(hostsAsArray.toArray(), hostsAsArray.toArray().length, String[].class);
        for (String hostname : hostsAsString) {
            hosts.add(new URI("http://" + hostname + ":8091/pools"));
        }

        return hosts;
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.