Examples of InvocationChain


Examples of org.apache.tuscany.sca.invocation.InvocationChain

            return invokeObjectMethod(method, args);
        }
        if (wire == null) {
            throw new ServiceRuntimeException("No runtime wire is available");
        }
        InvocationChain chain = getInvocationChain(method, wire);
        if (chain == null) {
            throw new IllegalArgumentException("No matching operation is found: " + method);
        }

        // send the invocation down the wire
View Full Code Here

Examples of org.apache.tuscany.spi.wire.InvocationChain

        return axisService;
    }

    public Object invokeTarget(org.apache.tuscany.spi.model.Operation<?> op, Object[] args)
        throws InvocationTargetException {
        InvocationChain chain = inboundWire.getInvocationChains().get(op);
        Interceptor headInterceptor = chain.getHeadInterceptor();
        if (headInterceptor == null) {
            try {
                // short-circuit the dispatch and invoke the target directly
                if (chain.getTargetInvoker() == null) {
                    throw new AssertionError("No target invoker [" + chain.getOperation().getName() + "]");
                }
                return chain.getTargetInvoker().invokeTarget(args);
            } catch (InvocationTargetException e) {
                // the cause was thrown by the target so throw it
                throw e;
            }
        } else {
            Object messageId = workContext.getCurrentMessageId();
            workContext.setCurrentMessageId(null);
            Object correlationId = workContext.getCurrentCorrelationId();
            workContext.setCurrentCorrelationId(null);

            Message msg = new MessageImpl();
            msg.setTargetInvoker(chain.getTargetInvoker());
            msg.setFromAddress(getFromAddress());
            if (messageId == null) {
                messageId = new MessageId();
            }
            msg.setMessageId(messageId);
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.