Package org.rioproject.entry

Examples of org.rioproject.entry.ComputeResourceInfo


                    jsbConfig = jsbAdmin.getServiceElement().getServiceBeanConfig();
                    instantiatorUuid = jsbAdmin.getServiceBeanInstantiatorUuid();
                }
            }

            ComputeResourceInfo computeResourceInfo = getComputeResourceInfo(item.attributeSets);
            if(computeResourceInfo!=null) {
                hostName = computeResourceInfo.hostName;
                hostAddress = computeResourceInfo.hostAddress;
            }
View Full Code Here


            svcName = type.getDisplayName();
        } else {
            svcName = item.service.getClass().getName();
        }

        ComputeResourceInfo computeResourceInfo = getComputeResourceInfo(attrs);

        java.util.Timer taskTimer = new java.util.Timer(true);
        long now = System.currentTimeMillis();
        UIComponentFetcher uiFetcher = new UIComponentFetcher();
        WaitingToLoadTask waitingToLoadTask;
View Full Code Here

        /* 2. Create and add OperationalStringEntry */
        String opStringName = context.getServiceElement().getOperationalStringName();
        if (opStringName != null)
            attrList.add(new OperationalStringEntry(opStringName));
        /* 3. Create and add ComputeResourceInfo */
        ComputeResourceInfo computeResourceInfo = new ComputeResourceInfo();
        computeResourceInfo.initialize(computeResource.getAddress());
        computeResourceInfo.hostName = computeResource.getHostName();
        attrList.add(computeResourceInfo);
        /* 4. Create and add Host */
        Host host = new Host(computeResource.getHostName());
        attrList.add(host);
View Full Code Here

     * @param attrs An array of attributes to search
     *
     * @return If found, the ComputeResourceInfo entry
     */
    public static ComputeResourceInfo getComputeResourceInfo(final Entry[] attrs) {
        ComputeResourceInfo computeResourceInfo = null;
        for (Entry attr : attrs) {
            if (attr.getClass().getName().equals(ComputeResourceInfo.class.getName())) {
                if (attr instanceof ComputeResourceInfo) {
                    computeResourceInfo = (ComputeResourceInfo) attr;
                    break;
                } else {
                    /*
                     * This addresses the issue where the discovered service
                     * has an ComputeResourceInfo but there is a class loading
                     * problem, which results in the classes being loaded by sibling
                     * class loaders, and assignability doesnt work.
                     */
                    computeResourceInfo = new ComputeResourceInfo();
                    try {
                        Field ha = attr.getClass().getDeclaredField("hostAddress");
                        Field hn = attr.getClass().getDeclaredField("hostName");
                        computeResourceInfo.hostAddress = (String) ha.get(attr);
                        computeResourceInfo.hostName = (String) hn.get(attr);
View Full Code Here

         */
        public boolean hostNameMatches(final Entry[] attrs) {
            Host host = getHost(attrs);
            if(host!=null)
                return(checkHosts(host));
            ComputeResourceInfo computeResourceInfo = getComputeResourceInfo(attrs);
            if(computeResourceInfo!=null)
                return(checkHosts(computeResourceInfo));
            return(false);
        }
View Full Code Here

                    Host host = getHost(item.attributeSets);
                    if(host!=null) {
                        sInfo.setHost(host.hostName);
                        updateHost();
                    } else {
                        ComputeResourceInfo computeResourceInfo = getComputeResourceInfo(item.attributeSets);
                        if(computeResourceInfo != null) {
                            /*if(computeResourceInfo.hostName.equals(computeResourceInfo.hostAddress))
                                sInfo.setHost(computeResourceInfo.hostName);
                            else*/
                                sInfo.setHost(computeResourceInfo.hostName+"@"+computeResourceInfo.hostAddress);
View Full Code Here

            if(node.getInstance()!=null) {
                buff.append("Instance ID=");
                buff.append(node.getInstance().getServiceBeanConfig().getInstanceID());
            }
            if (node.getServiceItem() != null) {
                ComputeResourceInfo aInfo = getComputeResourceInfo(node.getServiceItem().attributeSets);
                if(aInfo!=null) {
                    buff.append("\n");
                    if (aInfo.osName != null && aInfo.osName.length() > 0) {
                        buff.append("Operating System=");
                        buff.append(aInfo.osName);
View Full Code Here

TOP

Related Classes of org.rioproject.entry.ComputeResourceInfo

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.