Package org.globus.workspace.client_core.repr

Examples of org.globus.workspace.client_core.repr.State


        if (me == null || me.length == 0) {
            throw new Exception(prefix + "no MessageElement[]");
        }

        final State state;
        try {
            final CurrentState currentState =
                    (CurrentState) me[0].getValueAsType(
                                Constants_GT4_0.RP_CURRENT_STATE,
                                CurrentState.class);
View Full Code Here


                me = resp.get_any();
            }

            final String workspaceID = Integer.toString(this.id);
           
            final State state =
                    StateUtils.fromWireHelper(workspaceID, this.addr, me);

            return new StateOrTerminated(state);
           
        } catch (ResourceUnknownFaultType unknown) {
View Full Code Here

            throw new ParameterProblem(
                    "memory range requests aren't supported right now");
        }

        if (this.req.getInitialState() != null) {
            final State testing =
                    State.fromInitialState_Type(this.req.getInitialState());
            if (testing == null) {
                throw new ParameterProblem(
                    "initial state in deployment request is unrecognized?");
            }
View Full Code Here

        workspace.setRequestedShutdownMech(mech);

        if (this.req.getInitialState() == null) {
            workspace.setRequestedInitialState(State.DEFAULT_INITIAL_STATE);
        } else {
            final State initialState =
                    State.fromInitialState_Type(this.req.getInitialState());

            workspace.setRequestedInitialState(initialState);
        }

        // this might be incorrect information already, but it is the initial
        // state of all workspaces
        workspace.setCurrentState(new State(State.STATE_Unstaged));

        try {
            final DeploymentTime_Type time = this.req.getDeploymentTime();
            final int seconds =
                    CommonUtil.durationToSeconds(time.getMinDuration());
View Full Code Here

        if (!this.goodInput(master, workspace, newState)) {
            return; // *** EARLY RETURN ***
        }

        final State oldState = workspace.getCurrentState();
        workspace.setCurrentState(newState);
        this.printChanged(workspace, oldState, newState);
        this.theNewState(workspace, oldState, newState);
    }
View Full Code Here

                                   CountDownLatch targetLatch,
                                   CountDownLatch terminationLatch,
                                   State anotherDestroyState,
                                   boolean wasBestEffort) {

        final State getSchedAfter;
        if (wasBestEffort) {
            getSchedAfter = new State(State.STATE_Unpropagated);
        } else {
            getSchedAfter = null;
        }

        final StateChangeListener stateListener =
View Full Code Here

        }

        // InitialState_Type.fromValue() will not handle case difference,
        // which is why do the following annoying thing:

        final State st = new State(this.args.deploy_StateString);

        if (st.isPaused()) {
            return InitialState_Type.Paused;
        }

        if (st.isPropagated()) {
            return InitialState_Type.Propagated;
        }

        if (st.isRunning()) {
            return InitialState_Type.Running;
        }

        if (st.isUnpropagated()) {
            return InitialState_Type.Unpropagated;
        }

        if (st.isUnstaged()) {
            return InitialState_Type.Unstaged;
        }

        throw new IllegalStateException(
                "isValidRequestState() is apparently wrong.");
View Full Code Here

        if (!this.pr.enabled()) {
            return; // *** EARLY RETURN ***
        }

        final State state = workspace.getCurrentState();

        if (state == null) {
            final String err = "Problem: no state present in workspace query";
            if (this.pr.useThis()) {
                this.pr.errln(PrCodes.INSTANCERPQUERY__STATE_ERROR, err);
            } else if (this.pr.useLogging()) {
                logger.error(err);
            }
            return; // *** EARLY RETURN ***
        }

        final String msg = "State: " + state.getState();
        String err = null;
        final Exception error = state.getProblem();
        if (error != null) {
            err = "Problem: " +
                    CommonUtil.genericExceptionMessageWrapper(error);
        }

View Full Code Here

        } catch (Throwable t) {
            workspaceID = "[[could not parse workspace ID from EPR: " +
                    t.getMessage() + "]]";
        }

        final State newState;

        final ResourcePropertyValueChangeNotificationElementType valueChange =
                (ResourcePropertyValueChangeNotificationElementType) message;
       
        try {
View Full Code Here

TOP

Related Classes of org.globus.workspace.client_core.repr.State

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.