Package org.apache.tuscany.core.wire

Examples of org.apache.tuscany.core.wire.InvocationConfiguration


        if (holder == null) {
            TargetException e = new TargetException("Operation not configured");
            e.setIdentifier(method.getName());
            throw e;
        }
        InvocationConfiguration config = holder.config;
        if (config != null) {
           headInterceptor = config.getHeadInterceptor();
        }

        TargetInvoker invoker;

        if (holder.cachedInvoker == null) {
            assert config != null;
            if(config.getTargetInvoker() == null){
                TargetException e= new TargetException("No target invoker configured for operation");
                e.setIdentifier(config.getMethod().getName());
                throw e;
            }
            if (config.getTargetInvoker().isCacheable()) {
                // clone and store the invoker locally
                holder.cachedInvoker = (TargetInvoker) config.getTargetInvoker().clone();
                invoker = holder.cachedInvoker;
            } else {
                invoker = config.getTargetInvoker();
            }
        } else {
            assert config != null;
            invoker = config.getTargetInvoker();
        }
        if (headInterceptor == null) {
            try {
                // short-circuit the dispatch and invoke the target directly
                if (config.getTargetInvoker() == null) {
                    throw new AssertionError("No target invoker [" + method.getName() + "]");
                }
                return config.getTargetInvoker().invokeTarget(args);
            } catch (InvocationTargetException e) {
                // the cause was thrown by the target so throw it
                throw e.getCause();
            }
        } else {
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.wire.InvocationConfiguration

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.