Examples of MCTRuntimeException


Examples of gov.nasa.arc.mct.util.exception.MCTRuntimeException

    @Test(expectedExceptions = MCTRuntimeException.class)
    public void testMultipleMonitorsWithSamePort() throws Exception {

        // BSD semantics not implemented on Win O/S
        if (isWindows()) {
            throw new MCTRuntimeException("Testing of multiple Shift " +
        "Change Monitors on Windows O/S is not supported");
        } else {
            MCCIdentityManager idmgr = mock(MCCIdentityManager.class);
            ShiftChangeMonitor monitor = new ShiftChangeMonitor(idmgr);
            Assert.assertFalse(monitor.isMonitorRunning());
View Full Code Here

Examples of gov.nasa.arc.mct.util.exception.MCTRuntimeException

            ComponentInitializer clonedCapability = clonedComponent.getCapability(ComponentInitializer.class);
           
            clonedCapability.initialize();
            return clonedComponent;
        } catch (SecurityException e) {
            throw new MCTRuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new MCTRuntimeException(e);
        } catch (InstantiationException e) {
            throw new MCTRuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new MCTRuntimeException(e);
        }
    }
View Full Code Here

Examples of gov.nasa.arc.mct.util.exception.MCTRuntimeException

    private void _removeHousing(MCTAbstractHousing housing) {
        AbstractComponent rootComponent = housing.getWindowComponent();
        String id = rootComponent.getId();
        List<MCTAbstractHousing> housings = housingRegistry.get(id);
        if (housings == null)
            throw new MCTRuntimeException("Inconsistent housing registry state: deleting an unregistered housing for component: {id: " + id + ", component name: " + rootComponent.getDisplayName() +"} by user " + GlobalContext.getGlobalContext().getUser().getUserId() + " in thread " + Thread.currentThread().getName() + ".");
       
        housings.remove(housing);
        if (housings.isEmpty())
            housingRegistry.remove(id);
    }
View Full Code Here

Examples of gov.nasa.arc.mct.util.exception.MCTRuntimeException

                        .info(
                                "Shift change monitor: user {0} specified at startup. Listening for shift change events on port {1}",
                                this.primaryObserver.getCurrentUser(), port);
            } catch (BindException e1) {
                logger.error("Cannot bind to port: " + port);
                throw new MCTRuntimeException(e1);
            } catch (IOException e1) {
                logger.error(e1.getMessage(), e1);
                mayRun = false;
            }
            if (mayRun) {
View Full Code Here

Examples of gov.nasa.arc.mct.util.exception.MCTRuntimeException

                AbstractComponent mySandbox = platform.getDefaultComponentProvider().createSandbox(userId);
                AbstractComponent dropbox = platform.getDefaultComponentProvider().createDropbox(userId);
               
                String group = System.getProperty(DEFAULT_GROUP_PROP, MCTProperties.DEFAULT_MCT_PROPERTIES.getProperty(DEFAULT_GROUP_PROP, ""));
                if (group.isEmpty()) {
                    throw new MCTRuntimeException("Default group not specified, set the default group in mct.properties using the " + DEFAULT_GROUP_PROP + " property.");
                }
                platform.getPersistenceProvider().addNewUser(userId, group, mySandbox, dropbox);
                currentUser = platform.getPersistenceProvider().getUser(userId);
            } else {
                throw new MCTRuntimeException("MCT user '" + whoami
                        + "' is not in the MCT database. You can load MCT user(s) using MCT's load user tool.");
            }
        }
        GlobalContext.getGlobalContext().switchUser(currentUser, null);
        return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.