Package org.apache.tuscany.core.wire.jdk

Examples of org.apache.tuscany.core.wire.jdk.JDKInvocationHandler


            throws ContextInitException {
        super(name);
        assert (sourceWireFactory != null) : "Proxy factory was null";
        assert (messageFactory != null) : "Message factory was null";
        this.sourceWireFactory = sourceWireFactory;
        invocationHandler = new JDKInvocationHandler(messageFactory, sourceWireFactory.getConfiguration()
                .getInvocationConfigurations());
    }
View Full Code Here


    }

    public void testCheckedException() throws Exception {
        Map<Method, InvocationConfiguration> config = new MethodHashMap();
        config.put(checkedMethod, getConfiguration(checkedMethod));
        InvocationHandler handler = new JDKInvocationHandler(new MessageFactoryImpl(), config);
        try {
            TestBean proxy = (TestBean) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
                    new Class[]{TestBean.class}, handler);
            proxy.checkedException();
        } catch (TestException e) {
View Full Code Here

    }

    public void testRuntimeException() throws Exception {
        Map<Method, InvocationConfiguration> config = new MethodHashMap<InvocationConfiguration>();
        config.put(runtimeMethod, getConfiguration(runtimeMethod));
        InvocationHandler handler = new JDKInvocationHandler(new MessageFactoryImpl(), config);
        try {
            TestBean proxy = (TestBean) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),
                    new Class[]{TestBean.class}, handler);
            proxy.runtimeException();
        } catch (TestRuntimeException e) {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.wire.jdk.JDKInvocationHandler

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.