Package org.apache.tuscany.spi.component

Examples of org.apache.tuscany.spi.component.ScopeContainer.stop()


        assertFalse("foo".equals(target2.getString()));
        source.getTarget().setString("bar");
        assertFalse("bar".equals(source.getTarget().getString()));
        moduleScope.onEvent(new CompositeStop(this, null));
        moduleScope.stop();
        statelessScope.stop();
    }


    /**
     * Tests a session-to-session scoped wire
View Full Code Here


        source2.getTarget().setString("baz");
        assertEquals("baz", source2.getTarget().getString());
        assertEquals("baz", target2.getString());
        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.onEvent(new HttpSessionEnd(this, session2));
        sessionScope.stop();
    }


    /**
     * Tests a session-to-module scoped wire
View Full Code Here

        assertEquals("baz", target2.getString());
        assertEquals("baz", target.getString());
        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.onEvent(new HttpSessionEnd(this, session2));
        moduleScope.stop();
        sessionScope.stop();
    }

    /**
     * Tests a session-to-request scoped wire is setup properly by the runtime
     */
 
View Full Code Here

        assertEquals("foo", source.getTarget().getString());
        requestScope.onEvent(new RequestEnd(this));
        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.onEvent(new HttpSessionEnd(this, session1));
        requestScope.stop();
        sessionScope.stop();
    }


    /**
     * Tests a session-to-stateless scoped wire is setup properly by the runtime
View Full Code Here

        assertFalse("bar".equals(source.getTarget().getString()));

        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.onEvent(new HttpSessionEnd(this, session1));
        sessionScope.stop();
        statelessScope.stop();
    }

    /**
     * Tests a request-to-request scoped wire is setup properly by the runtime
     */
 
View Full Code Here

            }
        }, null);
        executor.execute(future);
        future.get();
        requestScope.onEvent(new RequestEnd(this));
        requestScope.stop();
    }

    /**
     * Tests a request-to-module scoped wire
     */
 
View Full Code Here

        assertEquals("bar", target.getString());

        requestScope.onEvent(new RequestEnd(this));
        requestScope.stop();
        moduleScope.onEvent(new CompositeStop(this, null));
        moduleScope.stop();
    }

    /**
     * Tests a request-to-session scoped wire is setup properly by the runtime
     */
 
View Full Code Here

        requestScope.onEvent(new RequestEnd(this));
        requestScope.stop();
        ctx.clearIdentifier(HttpSessionScopeContainer.HTTP_IDENTIFIER);
        sessionScope.onEvent(new HttpSessionEnd(this, session1));
        sessionScope.stop();
    }


    /**
     * Tests a request-to-stateless scoped wire is setup properly by the runtime
View Full Code Here

        assertFalse("foo".equals(target2.getString()));
        source.getTarget().setString("bar");
        assertFalse("bar".equals(source.getTarget().getString()));
        requestScope.onEvent(new RequestEnd(this));
        requestScope.stop();
        statelessScope.stop();
    }


    /**
     * Tests a stateless-to-stateless scoped wire is setup properly by the runtime
View Full Code Here

        assertFalse("foo".equals(source.getTarget().getString()));
        Target target2 = (Target) targetComponent.getServiceInstance();
        assertFalse("foo".equals(target2.getString()));
        source.getTarget().setString("bar");
        assertFalse("bar".equals(source.getTarget().getString()));
        statelessScope.stop();
    }

    /**
     * Tests a stateless-to-request scoped wire is setup properly by the runtime
     */
 
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.