Package org.rioproject.tools.cli.ServiceFinder

Examples of org.rioproject.tools.cli.ServiceFinder.ServiceInfo


    public static String[] formattedArray(final ServiceItem[] items) {
        List<OutputInfo> list = new ArrayList<OutputInfo>();
        ServiceInfo[] serviceInfo = CLI.getInstance().finder.getServiceInfo();
        for(int i=0; i<items.length; i++) {
            ServiceInfo sInfo = null;
            for (ServiceInfo aServiceInfo : serviceInfo) {
                ServiceItem item = aServiceInfo.getServiceItem();
                if (item.serviceID.equals(items[i].serviceID)) {
                    sInfo = aServiceInfo;
                    break;
                }
            }
            if(sInfo==null) {
                sInfo = new ServiceInfo(items[i]);
                Future<ServiceInfo> future = CLI.getInstance().finder.resolveServiceInfo(sInfo);
                try {
                    sInfo = future.get(5, TimeUnit.SECONDS);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            String name = sInfo.getServiceName();
            String[] groups = sInfo.getGroups();
            String host = sInfo.getHost();
            if(groups==null)
                groups = new String[]{"<?>"};

            String[] optionValues= new String[] {"", "", ""};
View Full Code Here

TOP

Related Classes of org.rioproject.tools.cli.ServiceFinder.ServiceInfo

Copyright © 2018 www.massapicom. 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.