Package org.rioproject.opstring

Examples of org.rioproject.opstring.OperationalString


    @Test
    public void concurrentCreationTest() throws ExecutionException, InterruptedException {
        OpStringManagerController opStringManagerController = new OpStringManagerController();
        opStringManagerController.setConfig(new DynamicConfiguration());
        OperationalString opString = new OpString("concurrent", null);

        List<Future<OpStringManager>> futures = new ArrayList<Future<OpStringManager>>();
        for(int i=0; i<50; i++) {
            Callable<OpStringManager> deployer = new Deployer(opStringManagerController, opString);
            FutureTask<OpStringManager> task = new FutureTask<OpStringManager>(deployer);
View Full Code Here


                                                        sbi.uuid,
                                                        null,
                                                        resourceCapability,
                                                        50);
        service = createServiceElement();
        OperationalString opString = new OpString("test", null);

        opString.addService(service);
        OpStringManager parent = null;
        boolean active = true;
        Configuration config = new DynamicConfiguration();
        OpStringManagerController opStringManagerController = new OpStringManagerController();
        manager = new DefaultOpStringManager(opString,
View Full Code Here

*/
public class DefaultOpStringManagerTest {

    @Test
    public void testSimpleStandAlone() throws IOException {
        OperationalString opString = new OpString("test", null);
        OpStringManager parent = null;
        boolean active = true;
        Configuration config = new DynamicConfiguration();
        OpStringManagerController opStringManagerController = new OpStringManagerController();
        DefaultOpStringManager manager = new DefaultOpStringManager(opString,
View Full Code Here

    @Test
    public void testNestedStandAlone() throws Exception {
        OpStringManagerController opStringManagerController = new OpStringManagerController();
        opStringManagerController.setConfig(new DynamicConfiguration());
        OperationalString opString1 = new OpString("test-1", null);

        Map<String, Throwable> errorMap = new HashMap<String, Throwable>();
        OpStringManager manager1 = opStringManagerController.addOperationalString(opString1,
                                                                                 errorMap,
                                                                                 null,
View Full Code Here

    @Test
    public void testNested() throws Exception {
        OpStringManagerController opStringManagerController = new OpStringManagerController();
        opStringManagerController.setConfig(new DynamicConfiguration());
        OperationalString opString1 = new OpString("test-1", null);

        Map<String, Throwable> errorMap = new HashMap<String, Throwable>();       

        OpString opString2 = new OpString("test-2", null);
        opString2.addOperationalString(opString1);
View Full Code Here

    private <T> T doLookupService(String serviceName, String opstringName, Class<T> type) {
        T service = null;
        try {
            DeployAdmin dAdmin = (DeployAdmin)monitor.getAdmin();
            OperationalStringManager opMgr = dAdmin.getOperationalStringManager(opstringName);
            OperationalString opstring = opMgr.getOperationalString();
            ServiceElement serviceElement = null;
            for(ServiceElement elem : opstring.getServices()) {
                if(elem.getName().equals(serviceName)) {
                    serviceElement = elem;
                    break;
                }
            }
View Full Code Here

    private <T> List<T> doLookupServices(String serviceName, String opstringName, Class<T> type) {
        List<T> services = new ArrayList<T>();
        try {
            DeployAdmin dAdmin = (DeployAdmin)monitor.getAdmin();
            OperationalStringManager opMgr = dAdmin.getOperationalStringManager(opstringName);
            OperationalString opstring = opMgr.getOperationalString();
            ServiceElement serviceElement = null;
            for(ServiceElement elem : opstring.getServices()) {
                if(elem.getName().equals(serviceName)) {
                    serviceElement = elem;
                    break;
                }
            }
View Full Code Here

    private Map.Entry<ServiceElement, OperationalStringManager> doLookupServiceEntry(String serviceName, String opstringName) {
        Map.Entry<ServiceElement, OperationalStringManager> entry = null;
        try {
            DeployAdmin dAdmin = (DeployAdmin)monitor.getAdmin();
            OperationalStringManager opMgr = dAdmin.getOperationalStringManager(opstringName);
            OperationalString opstring = opMgr.getOperationalString();
            ServiceElement serviceElement = null;
            for(ServiceElement elem : opstring.getServices()) {
                if(elem.getName().equals(serviceName)) {
                    serviceElement = elem;
                    break;
                }
            }
View Full Code Here

TOP

Related Classes of org.rioproject.opstring.OperationalString

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.