Package org.rioproject.system

Examples of org.rioproject.system.ComputeResourceUtilization


    public CybernodeUI(final Object arg) {
        super();
        getAccessibleContext().setAccessibleName("Cybernode admin");
        ServiceItem item = (ServiceItem) arg;
        cybernode = (Cybernode) item.service;
        ComputeResourceUtilization computeResource;
        try {
            cybernodeAdmin = (CybernodeAdmin)cybernode.getAdmin();
            computeResource = getComputeResourceUtilization(cybernodeAdmin);
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
        //idTable = new Hashtable();
        JPanel qPanel = new JPanel();
        qPanel.setLayout(new BoxLayout(qPanel, BoxLayout.X_AXIS));
        qPanel.setBorder(BorderFactory.createCompoundBorder(
                             BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Compute Resource"),
                             BorderFactory.createEmptyBorder(6, 6, 6, 6)));
        qPanel.add(new JLabel("Description"));
        qPanel.add(Box.createHorizontalStrut(8));

        String field="unknown: system error";
        if(computeResource!=null)
            field = computeResource.getDescription();
        JTextField descTF = new JTextField(field);
        descTF.setEnabled(false);
        qPanel.add(descTF);
        qPanel.add(Box.createHorizontalStrut(8));
        qPanel.add(new JLabel("Utilization"));
        qPanel.add(Box.createHorizontalStrut(8));
        if(computeResource!=null)
            field = computeResource.getUtilization().toString();
        utilizationTF = new JTextField(field);
        utilizationTF.setEnabled(false);
        qPanel.add(utilizationTF);

        JPanel cPanel = new JPanel();
View Full Code Here


    @Before
    public void setup() throws IOException {
        SBI sbi = new SBI();
        List<MeasuredResource> measuredResources = new ArrayList<MeasuredResource>();
        ComputeResourceUtilization resourceUtilization = new ComputeResourceUtilization("test",
                                                                                        sbi.inetAddress.getHostAddress(),
                                                                                        sbi.inetAddress.getHostName(),
                                                                                        measuredResources);
        SystemCapabilities systemCapabilities = new SystemCapabilities();
        PlatformCapability[] platformCapabilities = systemCapabilities.getPlatformCapabilities(new DynamicConfiguration());
View Full Code Here

TOP

Related Classes of org.rioproject.system.ComputeResourceUtilization

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.