Package org.globus.workspace.service.impls.async

Examples of org.globus.workspace.service.impls.async.TaskNotImplementedException


        if (target == STATE_REBOOT) {

            req = this.reqFactory.reboot();

            if (req == null) {
                throw new TaskNotImplementedException("reboot not implemented");
            }

            // would be cool to implement a 'reboot -> start-paused' option,
            // (there may be a conceivable application use), but for now we
            // expect reboot results in STATE_STARTED
            resource.setTargetStateUnderLock(STATE_STARTED);

            if (this.trace) {
                logger.trace("\n\n   ***** ST--start " + idStr +
                        ": adding reboot request: " + req + "\n");
            }

        } else if (current == STATE_PAUSED) {

            if (target == STATE_PAUSED) {
                throw new ProgrammingError("current and target are " +
                        "both paused");
            }

            req = reqFactory.unpause();

            if (req == null) {
                throw new TaskNotImplementedException(
                                        "unpause not implemented");
            }

            if (this.trace) {
                logger.trace("\n\n   ***** ST--start " + idStr +
                        ": adding unpause request: " + req + "\n");
            }

        } else if (current == STATE_PROPAGATED) {

            if (target == STATE_PAUSED) {
                req = reqFactory.startPaused();
                notifyPaused = true;
            } else {
                req = reqFactory.start();
            }

            if (req == null) {
                throw new TaskNotImplementedException(
                                        "start (create) not implemented");
            }

            if (this.trace) {
                logger.trace("\n\n   ***** ST--start " + idStr +
                        ": adding start (create) request: " + req + "\n");
            }

        } else if (current == STATE_SERIALIZED) {

            req = reqFactory.unserialize();

            if (req == null) {
                throw new TaskNotImplementedException(
                                        "unserialize not implemented");
            }

            if (this.trace) {
                logger.trace("\n\n   ***** ST--start " + idStr +
View Full Code Here


            target == STATE_STAGED_OUT) {

            req = reqFactory.shutdownNormal();

            if (req == null) {
                throw new TaskNotImplementedException(
                                    "shutdown normal unimplemented");
            }

            requestContext.setNotify(STATE_PROPAGATED);
            resource.setStateUnderLock(STATE_SHUTTING_DOWN, null);

            if (this.trace) {
                logger.trace("\n\n   ***** ST--shutdown " + idStr +
                        ": target state is " + tarStr +
                        ", adding shutdown-normal request: " + req + "\n");
            }


        } else if (target == STATE_PAUSED) {

            if (current == STATE_PAUSING) {
                return true;
            }

            // current == STATE_PAUSED guaranteed to be false, so we are
            // just left with STATE_STARTING and STATE_STARTED

            req = reqFactory.pause();

            if (req == null) {
                throw new TaskNotImplementedException("pause not implemented");
            }

            requestContext.setNotify(STATE_PAUSED);
            resource.setStateUnderLock(STATE_PAUSING, null);

            if (this.trace) {
                logger.trace("\n\n   ***** ST--shutdown " + idStr +
                        ": target state is " + tarStr +
                        ", adding pause request: " + req + "\n");
            }

        } else {

            req = reqFactory.shutdownSerialize();

            if (req == null) {
                throw new TaskNotImplementedException(
                                    "shutdown-serialize not implemented");
            }

            requestContext.setNotify(STATE_PROPAGATED);
            resource.setStateUnderLock(STATE_SERIALIZING, null);
View Full Code Here

TOP

Related Classes of org.globus.workspace.service.impls.async.TaskNotImplementedException

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.