Package org.apache.tuscany.sca.runtime

Examples of org.apache.tuscany.sca.runtime.RuntimeEndpoint.bind()


        CompositeContext compositeContext = getCompositeContext();
        FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
        RuntimeAssemblyFactory assemblyFactory = (RuntimeAssemblyFactory)modelFactories.getFactory(AssemblyFactory.class);
       
        RuntimeEndpoint endpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint();
        endpoint.bind(compositeContext);
        endpoint.setComponent(getComponent());

        // Create pseudo-service
        ComponentService service = assemblyFactory.createComponentService();
        JavaInterfaceFactory javaInterfaceFactory =
View Full Code Here


     */
    private RuntimeEndpoint createAsyncCallbackEndpoint(RuntimeEndpointReference epr) {
        CompositeContext compositeContext = epr.getCompositeContext();
        RuntimeAssemblyFactory assemblyFactory = getAssemblyFactory(compositeContext);
        RuntimeEndpoint endpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint();
        endpoint.bind(compositeContext);

        // Create a pseudo-component and pseudo-service
        // - need to end with a chain with an invoker into the AsyncCallbackHandler class
        RuntimeComponent fakeComponent = null;
        try {
View Full Code Here

        HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, null, null, "bar");
        reg1.start();

        System.out.println("Adding ep1");
        RuntimeEndpoint ep1 = createEndpoint("ep1uri");
        ep1.bind(extensionPoints, reg1);
        reg1.addEndpoint(ep1);

        System.out.println("Starting reg3");
        HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9877&multicast=off&remotes=127.0.0.1:9876", "bar");
        reg2.start();
View Full Code Here

        assertExists(reg2, "ep1uri");
        assertExists(reg3, "ep1uri");

        System.out.println("Adding ep2");
        RuntimeEndpoint ep2 = createEndpoint("ep2uri");
        ep2.bind(extensionPoints, reg2);
        reg2.addEndpoint(ep2);

        assertExists(reg2, "ep2uri");
        assertExists(reg1, "ep2uri");
        assertExists(reg3, "ep2uri");
View Full Code Here

    @Test
    public void testDuplicates() throws Exception {
        HazelcastEndpointRegistry reg1 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9876&multicast=off", "bar");
        reg1.start();
        RuntimeEndpoint ep1 = createEndpoint("ep1uri");
        ep1.bind(extensionPoints, reg1);
        reg1.addEndpoint(ep1);

        HazelcastEndpointRegistry reg2 = new HazelcastEndpointRegistry(extensionPoints, null, "tuscany:foo?listen=127.0.0.1:9877&multicast=off&remotes=127.0.0.1:9876", "bar");
        reg2.start();
View Full Code Here

        // attrs3.put("routes", host + ":"+port1);
        ReplicatedEndpointRegistry reg3 = new ReplicatedEndpointRegistry(extensionPoints, attrs3, "foo", "bar");
        reg3.addListener(this);
        reg3.start();

        ep1.bind(extensionPoints, reg1);
        reg1.addEndpoint(ep1);
        assertExists(reg1, "ep1uri");
        assertExists(reg2, "ep1uri");
        assertExists(reg3, "ep1uri");
View Full Code Here

        assertExists(reg1, "ep1uri");
        assertExists(reg2, "ep1uri");
        assertExists(reg3, "ep1uri");

        RuntimeEndpoint ep2 = createEndpoint("ep2uri");
        ep2.bind(extensionPoints, reg2);
        reg2.addEndpoint(ep2);
        assertExists(reg2, "ep2uri");
        assertExists(reg1, "ep2uri");
        assertExists(reg3, "ep2uri");
View Full Code Here

     */
    private RuntimeEndpoint createAsyncCallbackEndpoint(RuntimeEndpointReference epr) {
        CompositeContext compositeContext = epr.getCompositeContext();
        RuntimeAssemblyFactory assemblyFactory = getAssemblyFactory(compositeContext);
        RuntimeEndpoint endpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint();
        endpoint.bind(compositeContext);

        // Create a pseudo-component and pseudo-service
        // - need to end with a chain with an invoker into the AsyncCallbackHandler class
        RuntimeComponent fakeComponent = null;
        try {
View Full Code Here

        HazelcastDomainRegistry reg1 = new HazelcastDomainRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9876&multicast=off", "bar");
        reg1.start();

        System.out.println("Adding ep1");
        RuntimeEndpoint ep1 = createEndpoint("ep1uri");
        ep1.bind(extensionPoints, reg1);
        reg1.addEndpoint(ep1);

        System.out.println("Starting reg3");
        HazelcastDomainRegistry reg2 = new HazelcastDomainRegistry(extensionPoints, (Properties)null, "tuscany:foo?bind=127.0.0.1:9877&multicast=off&wka=127.0.0.1:9876", "bar");
        reg2.start();
View Full Code Here

        assertExists(reg2, "ep1uri");
        assertExists(reg3, "ep1uri");

        System.out.println("Adding ep2");
        RuntimeEndpoint ep2 = createEndpoint("ep2uri");
        ep2.bind(extensionPoints, reg2);
        reg2.addEndpoint(ep2);

        assertExists(reg2, "ep2uri");
        assertExists(reg1, "ep2uri");
        assertExists(reg3, "ep2uri");
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.