Package org.apache.tuscany.sca.invocation

Examples of org.apache.tuscany.sca.invocation.Invoker.invoke()


        try {
            // TODO - EPR - no required for OASIS
            //conversationPreinvoke(msg);
            // handleCallback(msg, currentConversationID);
            // dispatch the wire down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw new InvocationTargetException((Throwable)body);
            }
            return body;
View Full Code Here


        handleCallback(msg, wire);
        ThreadMessageContext.setMessageContext(msg);
        boolean abnormalEndConversation = false;
        try {
            // dispatch the wire down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                /* TODO - EPR - not required in OASIS
                // mark the conversation as ended if the exception is not a business exception
                if (currentConversationID != null ){
View Full Code Here

        ThreadMessageContext.setMessageContext(msg);
        try {
            conversationPreinvoke(msg);
            // handleCallback(msg, currentConversationID);
            // dispatch the wire down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw new InvocationTargetException((Throwable)body);
            }
            return body;
View Full Code Here

        Operation operation = chain.getTargetOperation();
        msg.setOperation(operation);

        Message msgContext = ThreadMessageContext.setMessageContext(msg);
        try {
            return headInvoker.invoke(msg);
        } finally {
            ThreadMessageContext.setMessageContext(msgContext);
        }
    }
   
View Full Code Here

          msg.getHeaders().put("MESSAGE_ID", msgID);
        } // end if

        try {
            // dispatch the source down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw (Throwable)body;
            }
            return body;
View Full Code Here

          msg.getHeaders().put(Constants.RELATES_TO, msgID);
        } // end if

        try {
            // dispatch the source down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw (Throwable)body;
            }
            return body;
View Full Code Here

        msg.setFrom(wire.getSource());
        msg.setTo(wire.getTarget());
        ThreadMessageContext.setMessageContext(msg);
        try {
            // dispatch the wire down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw (Throwable)body;
            }
            return body;
View Full Code Here

        Object msgBody = msg.getBody();
       
        for (InvocationChain subscriberInvocationChain : subscriberInvocationChains) {
            Invoker chainInvoker = subscriberInvocationChain.getHeadInvoker();
            msg.setBody(msgBody);
            chainInvoker.invoke(msg);
        }
       
        return RESPONSE;
    }
   
View Full Code Here

        conversationPreinvoke(msg, wire);
        handleCallback(msg, wire, currentConversationID);
        ThreadMessageContext.setMessageContext(msg);
        try {
            // dispatch the wire down the chain and get the response
            Message resp = headInvoker.invoke(msg);
            Object body = resp.getBody();
            if (resp.isFault()) {
                throw (Throwable)body;
            }
            return body;
View Full Code Here

        Invoker localNotificationInvoker = new NotificationComponentInvoker(operation, component);
       
        Message msg = EasyMock.createNiceMock(Message.class);
        EasyMock.expect(msg.getBody()).andReturn("msg").times(3)// once per sub int + once in notif target invoker
        EasyMock.replay(msg);
        localNotificationInvoker.invoke(msg);
        EasyMock.verify(msg);
        } catch(Throwable e) {
            e.printStackTrace();
        }
    }
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.