Package io.fathom.auto.config

Examples of io.fathom.auto.config.ConfigPath.listChildren()


    public List<Endpoint> lookup(String serviceKey) {
        List<Endpoint> endpoints = Lists.newArrayList();

        try {
            ConfigPath parent = endpointsRoot.child(serviceKey);
            for (ConfigEntry child : parent.listChildren()) {
                String name = child.getName();
                String data = parent.readChild(name);

                EndpointData record = JsonCodec.gson.fromJson(data, EndpointData.class);
View Full Code Here


    public List<Integer> getServerIds() throws IOException {
        ConfigPath servers = base.child("servers");
        List<Integer> serverIds = Lists.newArrayList();

        Iterable<ConfigEntry> children = servers.listChildren();
        if (children == null) {
            // Not found
            return null;
        }
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.