Examples of ServiceReferenceImpl


Examples of org.apache.tuscany.sca.core.context.impl.ServiceReferenceImpl

            enhancer.setSuperclass(interfaze);
            enhancer.setCallback(new CglibMethodInterceptor<T>(interfaze, invocable));
            Object proxy = enhancer.create();
            return interfaze.cast(proxy);
        }       
        ServiceReference<T> serviceReference = new ServiceReferenceImpl(interfaze, invocable, null);
        return createProxy(serviceReference);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.core.context.impl.ServiceReferenceImpl

    /**
     * create the callback proxy with cglib. use the same
     * JDKCallbackInvocationHandler as JDKProxyService.
     */
    public <T> T createCallbackProxy(Class<T> interfaze, final List<? extends Invocable> wires) throws ProxyCreationException {
        ServiceReferenceImpl<T> callbackReference = new ServiceReferenceImpl(interfaze, wires.get(0), null);
        return callbackReference != null ? createCallbackProxy(callbackReference) : null;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.core.context.impl.ServiceReferenceImpl

            enhancer.setSuperclass(interfaze);
            enhancer.setCallback(new CglibMethodInterceptor<T>(interfaze, invocable));
            Object proxy = enhancer.create();
            return interfaze.cast(proxy);
        }       
        ServiceReference<T> serviceReference = new ServiceReferenceImpl(interfaze, invocable, null);
        return createProxy(serviceReference);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.core.context.impl.ServiceReferenceImpl

    /**
     * create the callback proxy with cglib. use the same
     * JDKCallbackInvocationHandler as JDKProxyService.
     */
    public <T> T createCallbackProxy(Class<T> interfaze, final List<? extends Invocable> wires) throws ProxyCreationException {
        ServiceReferenceImpl<T> callbackReference = new ServiceReferenceImpl(interfaze, wires.get(0), null);
        return callbackReference != null ? createCallbackProxy(callbackReference) : null;
    }
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

                qualified.getLocalPart());
    }
   
    @Test
    public void testUnqualifyReference() {
        ServiceReference reference = new ServiceReferenceImpl(
                ComponentNames.qualify(COMPONENT_NAME, SERVICE_NAME), null, null, null);
       
        QName unqualified = ComponentNames.unqualify(reference);
       
        Assert.assertEquals(COMPONENT_NAME.getNamespaceURI(), unqualified.getNamespaceURI());
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

        long afterStop = System.currentTimeMillis();
        Assert.assertTrue((afterStop - beforeStop) < 6000);
    }
   
    private ServiceReference registerInOutService(String name, ExchangeHandler handler) {
        ServiceReferenceImpl reference = new ServiceReferenceImpl(
                new QName(name), new InOutService(), _domain, null);
        _domain.registerService(new QName(name), new InOutService(), handler);
        reference.setDispatcher(_provider.createDispatcher(reference));
        return reference;
    }
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

        _camelContext.stop();
    }

    @Test
    public void testCopyFromExchange() throws Exception {
        ServiceReference inOnly = new ServiceReferenceImpl(
            new QName("exchange-copy"), new InOnlyService(), _domain, null);
        ExchangeDispatcher dispatch = _provider.createDispatcher(inOnly);
       
        Exchange ex = dispatch.createExchange(null, ExchangePattern.IN_ONLY);
        Context ctx = ex.getContext();
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

    }

    @Test
    public void testCreateDispatcher() throws Exception {
        // verify that dispatchers can be created for an InOnly service
        ServiceReference inOnly = new ServiceReferenceImpl(
            new QName("inOnly"), new InOnlyService(), _domain, null);
        assertNotNull(_provider.createDispatcher(inOnly));

        // verify that dispatchers can be created for an InOut service
        ServiceReference inOut = new ServiceReferenceImpl(
            new QName("inOut"), new InOutService(), _domain, null);
        assertNotNull(_provider.createDispatcher(inOut));
    }
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

        assertNotNull(_provider.createDispatcher(inOut));
    }

    @Test
    public void testGetDispatcher() throws Exception {
        ServiceReference ref = new ServiceReferenceImpl(
            new QName("testGetDispatcher"), new InOnlyService(), null, null);
        Dispatcher dispatch = _provider.createDispatcher(ref);

        assertEquals(dispatch, _provider.getDispatcher(ref));
    }
View Full Code Here

Examples of org.switchyard.internal.ServiceReferenceImpl

    private ServiceReference registerInOutService(String name) {
        return registerInOutService(name, new MockHandler().forwardInToOut());
    }

    private ServiceReference registerInOnlyService(String name, ExchangeHandler handler) {
        ServiceReferenceImpl reference = new ServiceReferenceImpl(new QName(name), new InOnlyService(), _domain, null);
        _domain.registerService(new QName(name), new InOnlyService(), handler);
        reference.setDispatcher(_provider.createDispatcher(reference));
        return reference;
    }
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.