Package org.rioproject.deploy

Examples of org.rioproject.deploy.ServiceRecord


                columnNames = new String[]{"Name", "Implementation Class", "PID", "Time Active"};
        }

        public Object getValueAt(int index, int columnIndex) {
            try {
                ServiceRecord record = tableData.get(index);
                if(showPid) {
                    switch(columnIndex) {
                        case 0:
                            return(record.getName());
                        case 1:
                            return(record.getServiceElement().getComponentBundle().
                                getClassName());
                        case 2:
                            return record.getPid();
                        case 3:
                            return(TimeUtil.format(record.computeElapsedTime()));
                        default:
                            return(null);
                    }
                } else {
                    switch(columnIndex) {
                        case 0:
                            return(record.getName());
                        case 1:
                            return(record.getServiceElement().getComponentBundle().
                                getClassName());
                        case 2:
                            return(TimeUtil.format(record.computeElapsedTime()));
                        default:
                            return(null);
                    }
                }
            } catch(Exception e) {
View Full Code Here


                                                           container.getComputeResource().getHostName(),
                                                           container.getComputeResource().getAddress().getHostAddress(),
                                                           container.getUuid());

                        /* Create the ServiceRecord */
                        serviceRecord = new ServiceRecord(serviceID,
                                                          sElem,
                                                          container.getComputeResource().getAddress().getHostName());
                    }

                    /* If we have not aborted, continue ... */
 
View Full Code Here

        synchronized(controllerMap) {
            Collection<ServiceBeanDelegate> controllers = controllerMap.values();
            delegates = controllers.toArray(new ServiceBeanDelegate[controllers.size()]);
        }
        for (ServiceBeanDelegate delegate : delegates) {
            ServiceRecord record = delegate.getServiceRecord();
            if (record != null) {
                list.add(record);
            }
        }
        return (list.toArray(new ServiceRecord[list.size()]));
View Full Code Here

            delegate = controllerMap.get(identifier);
        }
        if(delegate == null) {
            return;
        }
        ServiceRecord record = delegate.getServiceRecord();
        if(record==null) {
            logger.warn("ServiceRecord for [{}] is null, no way to notify container of instantiation",
                           delegate.getServiceElement().getName());
            return;
        }
View Full Code Here

        serviceStatementManager = new TransientServiceStatementManager(EmptyConfiguration.INSTANCE);

        for (String name : names) {
            Uuid uuid = UuidFactory.generate();
            ServiceElement element = makeServiceElement(name);
            ServiceRecord serviceRecord = new ServiceRecord(uuid, element, "hostname");
            ServiceStatement statement = new ServiceStatement(element);
            statement.putServiceRecord(recordingUuid, serviceRecord);
            statements.add(statement);
        }
        for(ServiceStatement statement : statements) {
View Full Code Here

        Assert.assertNotNull(element);
        ServiceStatement statement = serviceStatementManager.get(element);
        Assert.assertNotNull(statement);
        ServiceRecord[] records = statement.getServiceRecords();
        Assert.assertEquals(1, records.length);
        ServiceRecord inActiveServiceRecord = records[0];
        inActiveServiceRecord.setType(ServiceRecord.INACTIVE_SERVICE_RECORD);
        /* Putting the INACTIVE_SERVICE_RECORD ServiceRecord will replace the ACTIVE_SERVICE_RECORD since the
         * records have the same Uuid */
        statement.putServiceRecord(recordingUuid, inActiveServiceRecord);
        ServiceRecord activeServiceRecord = new ServiceRecord(UuidFactory.generate(),
                                                              statement.getServiceElement(),
                                                              "hostname");
        statement.putServiceRecord(recordingUuid, activeServiceRecord);
        Assert.assertEquals(2, statement.getServiceRecords().length);
        serviceStatementManager.record(statement);
View Full Code Here

TOP

Related Classes of org.rioproject.deploy.ServiceRecord

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.