Package org.apache.tuscany.sca.interfacedef

Examples of org.apache.tuscany.sca.interfacedef.ConversationSequence


                                                        "Method should not declare exceptions with an @OneWay annotation. " + method,
                                                        method);
                }
            }

            ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE;
            if (method.isAnnotationPresent(EndsConversation.class)) {
                if (!conversational) {
                    throw new InvalidOperationException(
                                                        "Method is marked as end conversation but contract is not conversational",
                                                        method);
View Full Code Here


    public Message invoke(Message msg) {
        Operation op = msg.getOperation();
        if (op == null) {
            op = this.operation;
        }
        ConversationSequence sequence = op.getConversationSequence();
        Object payload = msg.getBody();

        Object contextId = null;

        EndpointReference from = msg.getFrom();
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    private void conversationPostInvoke(Message msg, RuntimeWire wire, boolean abnormalEndConversation)
                     throws TargetDestructionException {
        Operation operation = msg.getOperation();
        ConversationSequence sequence = operation.getConversationSequence();
        // We check that conversation has not already ended as there is only one
        // conversation manager in the runtime and so, in the case of remote bindings,
        // the conversation will already have been stopped when we get back to the client
        if ((sequence == ConversationSequence.CONVERSATION_END || abnormalEndConversation) &&
            (conversation.getState() != ConversationState.ENDED)) {
View Full Code Here

            Class returnType = method.getReturnType();
            Class[] paramTypes = method.getParameterTypes();
            Class[] faultTypes = method.getExceptionTypes();
            boolean nonBlocking = method.isAnnotationPresent(OneWay.class);
            ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE;
            if (method.isAnnotationPresent(EndsConversation.class)) {
                if (!conversational) {
                    throw new InvalidOperationException(
                                                        "Method is marked as end conversation but contract is not conversational",
                                                        method);
View Full Code Here

        msg.setCorrelationID(callbackID);
        Operation operation = chain.getTargetOperation();
        msg.setOperation(operation);
        Interface contract = operation.getInterface();
        if (contract != null && contract.isConversational()) {
            ConversationSequence sequence = operation.getConversationSequence();
            if (sequence == ConversationSequence.CONVERSATION_END) {
                msg.setConversationSequence(ConversationSequence.CONVERSATION_END);
                conversationStarted = false;
                if (conversation != null) {
                    conversation.setConversationID(null);
View Full Code Here

   
    private Object invokeTarget(Message msg) throws InvocationTargetException {

   
        ConversationSequence sequence = msg.getConversationSequence();
        Object contextId = ThreadMessageContext.getMessageContext().getConversationID();
        EndpointReference from = ThreadMessageContext.getMessageContext().getFrom();
        try {
            OSGiInstanceWrapper wrapper = (OSGiInstanceWrapper)getInstance(sequence, contextId);
            Object instance;
View Full Code Here

        if (messageId != null) {
            Message workContext = ThreadMessageContext.getMessageContext();
            workContext.setCorrelationID(messageId);
        }

        ConversationSequence sequence = msg.getConversationSequence();
        Object payload = msg.getBody();
       
        // FIXME: How to deal with other scopes
        Object contextId = ThreadMessageContext.getMessageContext().getConversationID();
        try {
View Full Code Here

                                                        "Method should not declare exceptions with an @OneWay annotation. " + method,
                                                        method);
                }
            }

            ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE;
            if (method.isAnnotationPresent(EndsConversation.class)) {
                if (!conversational) {
                    throw new InvalidOperationException(
                                                        "Method is marked as end conversation but contract is not conversational",
                                                        method);
View Full Code Here

    public Message invoke(Message msg) {
        Operation op = msg.getOperation();
        if (op == null) {
            op = this.operation;
        }
        ConversationSequence sequence = op.getConversationSequence();
        Object payload = msg.getBody();

        Object contextId = null;

        EndpointReference from = msg.getFrom();
View Full Code Here

    @Test
    public void testServiceContractConversationalInformationIntrospection() throws Exception {
        Interface i = javaFactory.createJavaInterface(Foo.class);
        assertNotNull(i);
        assertTrue(i.isConversational());
        ConversationSequence seq = getOperation(i, "operation").getConversationSequence();
        assertEquals(ConversationSequence.CONVERSATION_CONTINUE, seq);
        seq = getOperation(i, "endOperation").getConversationSequence();
        assertEquals(ConversationSequence.CONVERSATION_END, seq);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.ConversationSequence

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.