Package org.rioproject.cybernode

Examples of org.rioproject.cybernode.Cybernode


                        }
                        pmp.getGraphView().setOpStringState(ops.getName());
                    }
                }
                if(item.service instanceof Cybernode) {
                    Cybernode c = (Cybernode)item.service;
                    CybernodeAdmin cAdmin;
                    try {
                        cAdmin = (CybernodeAdmin)c.getAdmin();
                        cup.addCybernode(item,
                                         cAdmin,
                                         getComputeResourceUtilization(cAdmin, item),
                                         utilizationColumnManager);
                        cruTask.addCybernode(item);
View Full Code Here


        final List<ServiceItem> removals = new ArrayList<ServiceItem>();
        private boolean cancelled = false;

        void addCybernode(ServiceItem item) {
            try {
                Cybernode proxy =  (Cybernode)item.service;
                CybernodeAdmin cAdmin = (CybernodeAdmin)proxy.getAdmin();
                synchronized(adminTable) {
                    adminTable.put(item, cAdmin);
                }

            } catch (RemoteException e) {
View Full Code Here

            synchronized(adminTable) {
                tableSet = adminTable.entrySet();
            }
            for (Map.Entry<ServiceItem, CybernodeAdmin> mapEntry : tableSet) {
                ServiceItem item = mapEntry.getKey();
                Cybernode cybernode = (Cybernode)item.service;
                CybernodeAdmin cAdmin = mapEntry.getValue();
                try {
                    ComputeResourceUtilization cru = getComputeResourceUtilization(cAdmin, item);
                    cup.update(item, cAdmin, cru, utilizationColumnManager);
                } catch (Throwable e) {
View Full Code Here

    private TestManager testManager;

    @Test
    public void testDeployMap1() throws RemoteException {
        Assert.assertNotNull(testManager);
        Cybernode cybernode = (Cybernode)testManager.waitForService(Cybernode.class);
        Assert.assertNotNull(cybernode);
        OperationalStringManager mgr = testManager.getOperationalStringManager();
        testManager.waitForDeployment(mgr);

        DeploymentMap dMap = mgr.getDeploymentMap();
View Full Code Here

     */
    public static int[] calcServices(Cybernode[] cybernodes, Class type) throws RemoteException {

        int[] res = new int[cybernodes.length];
        for (int i = 0; i < cybernodes.length; i++) {
            Cybernode cybernode = cybernodes[i];
            ServiceRecord[] records = cybernode.getServiceRecords(ServiceRecord.ACTIVE_SERVICE_RECORD);
            for (ServiceRecord record : records) {
                ServiceElement element = record.getServiceElement();
                ClassBundle[] exportBundles = element.getExportBundles();
                for (ClassBundle bundle : exportBundles) {
                    if (bundle.getClassName().equals(type.getName())) {
View Full Code Here

                //pms.remove(pm);
                logger.info("Provision Monitor [" + i + "] has been stopped");

                // 6. STOP CYBERNODE RUNNING THE SERVICE
                logger.info("---> Stopping the busy Cybernode ...");
                Cybernode cybernode = CybernodeUtils.findBusy(cybernodes);
                testManager.stopCybernode(cybernode);
                cybernodes.remove(cybernode);
                logger.info("---> The busy Cybernode has been stopped");

                pmMon.waitFor(N - 1 - i);
View Full Code Here

        cyMon.waitFor(1);

        List<Cybernode> cybernodes = cyMon.getServices();
        List<ProvisionMonitor> pms = pmMon.getServices();

        Cybernode cybernode = cybernodes.get(0);
        ProvisionMonitor pm = pms.get(0);

       
        // 3. DEPLOY OPSTRING
        testManager.deploy(new File("src/test/resources/opstring/simple_opstring.groovy"));
View Full Code Here

    /**
     * Override ServiceBeanAdapter createProxy to return a Cybernode Proxy
     */
    @Override
    protected Object createProxy() {
        Cybernode cybernode = (Cybernode)getExportedProxy();
        if(cybernode==null) {
            logger.error("Could not get the exported proxy for the Cybernode, " +
                          "returning null. The Cybernode will not be able to " +
                          "accept remote inbound communications");
            return null;
View Full Code Here

    public PlatformCapabilityUI(final Object arg) {
        super();
        getAccessibleContext().setAccessibleName("Platform Capabilities");
        ServiceItem item = (ServiceItem)arg;
        Cybernode cybernode = (Cybernode) item.service;
        try {
            cybernodeAdmin = (CybernodeAdmin) cybernode.getAdmin();
        } catch (Exception e) {
            showError(e);
        }
        setLayout(new BorderLayout(2, 4));
        setBorder(BorderFactory.createCompoundBorder(
View Full Code Here

    private static ServiceItem[] getCybernodes(final String action) throws RemoteException {
        List<ServiceItem> list = new ArrayList<ServiceItem>();
        ServiceItem[] items = CLI.getInstance().getServiceFinder().findCybernodes(null, null);
        for(ServiceItem item : items) {
            Cybernode c = (Cybernode)item.service;
            if(action.equals(RELEASE)) {
                if(c.isEnlisted()) {
                    list.add(item);
                }
            } else {
                if(!c.isEnlisted()) {
                    list.add(item);
                }
            }
        }
        return list.toArray(new ServiceItem[list.size()]);
View Full Code Here

TOP

Related Classes of org.rioproject.cybernode.Cybernode

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.