Package com.amazonaws.services.simpleworkflow.flow.core

Examples of com.amazonaws.services.simpleworkflow.flow.core.TryFinally


        checkState();
        final Settable<T> result = new Settable<T>();
        if (runId.isReady()) {
            runId = new Settable<String>();
        }
        new TryFinally(waitFor) {

            Promise<StartChildWorkflowReply> reply;

            @Override
            protected void doTry() throws Throwable {
View Full Code Here


                throw ite.getTargetException();
            }
            Class<?> returnType = method.getReturnType();
            boolean isVoidReturnType = Void.TYPE.equals(returnType);
            final Settable<Object> result = isVoidReturnType ? null : new Settable<Object>();
            new TryFinally() {

                Object r;

                @Override
                protected void doTry() throws Throwable {
View Full Code Here

        }
    }

    private void executeAccordingToSchedule(final AsyncRunnable command, final Date startTime, final int pastInvocationsCount, Promise<Void> nextInvocationTimer) {
        final Settable<Date> invoked = new Settable<Date>();
        new TryFinally(nextInvocationTimer) {

            private Date lastInvocationTime;

            @Override
            protected void doTry() throws Throwable {
View Full Code Here

     * that is part of workflow can be unit tested through direct instantiation.
     */
    @Test
    public void directTest() {
        final HelloWorldWorkflow workflow = new HelloWorldWorkflowImpl();
        new TryFinally() {

            @Override
            protected void doTry() throws Throwable {
                // helloWorld returns void so we use TryFinally
                // to wait for its completion
View Full Code Here

        final ActivityType activityType = new ActivityType();
        activityType.setName("PeriodicWorkflowActivities.doSomeWork");
        activityType.setVersion("1.0");
        final Object[] parameters = new Object[] { "parameter1" };

        new TryFinally() {

            @Override
            protected void doTry() throws Throwable {
                workflow.startPeriodicWorkflow(activityType, parameters, options);
            }
View Full Code Here

        checkState();
        final Settable<T> result = new Settable<T>();
        if (runId.isReady()) {
            runId = new Settable<String>();
        }
        new TryFinally(waitFor) {

            Promise<StartChildWorkflowReply> reply;

            @Override
            protected void doTry() throws Throwable {
View Full Code Here

                throw ite.getTargetException();
            }
            Class<?> returnType = method.getReturnType();
            boolean isVoidReturnType = Void.TYPE.equals(returnType);
            final Settable<Object> result = isVoidReturnType ? null : new Settable<Object>();
            new TryFinally() {

                Object r;

                @Override
                protected void doTry() throws Throwable {
View Full Code Here

                throw ite.getTargetException();
            }
            Class<?> returnType = method.getReturnType();
            boolean isVoidReturnType = Void.TYPE.equals(returnType);
            final Settable<Object> result = isVoidReturnType ? null : new Settable<Object>();
            new TryFinally() {

                Object r;

                @Override
                protected void doTry() throws Throwable {
View Full Code Here

        checkState();
        final Settable<T> result = new Settable<T>();
        if (runId.isReady()) {
            runId = new Settable<String>();
        }
        new TryFinally(waitFor) {

            Promise<StartChildWorkflowReply> reply;

            @Override
            protected void doTry() throws Throwable {
View Full Code Here

        checkState();
        final Settable<T> result = new Settable<T>();
        if (runId.isReady()) {
            runId = new Settable<String>();
        }
        new TryFinally(waitFor) {

            Promise<StartChildWorkflowReply> reply;

            @Override
            protected void doTry() throws Throwable {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleworkflow.flow.core.TryFinally

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.