Package org.apache.tuscany.sca.interfacedef

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


            Class<?> returnType = getActualType(method.getGenericReturnType(), method.getReturnType(), typeBindings);
            Class<?>[] parameterTypes = getActualTypes(method.getGenericParameterTypes(), method.getParameterTypes(), typeBindings);
            Class<?>[] faultTypes = getActualTypes(method.getGenericExceptionTypes(), method.getExceptionTypes(), typeBindings);
           
            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


     * @throws TargetDestructionException
     */
    @SuppressWarnings("unchecked")
    private void conversationPostInvoke(Message msg, RuntimeWire wire) 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) &&
            (conversation.getState()!= ConversationState.ENDED)) {
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    private void conversationPostInvoke(Message msg) throws TargetDestructionException {
        if (conversational) {      
            Operation operation = msg.getOperation();
            ConversationSequence sequence = operation.getConversationSequence();
            if (sequence == ConversationSequence.CONVERSATION_END) {
                // in some cases the ConversationID that should be used comes in with the
                // message, e.g. when ws binding is in use.
                Object convID = msg.getFrom().getReferenceParameters().getConversationID();
                if (convID != null) {
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

    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

     * @throws TargetDestructionException
     */
    @SuppressWarnings("unchecked")
    private void conversationPostInvoke(Message msg, RuntimeWire wire) 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) && (conversation.getState() != ConversationState.ENDED)) {

View Full Code Here

    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

    }

    public void testNonConversationalInformationIntrospection() throws Exception {
        Interface i = javaFactory.createJavaInterface(NonConversationalFoo.class);
        assertFalse(i.isConversational());
        ConversationSequence seq = getOperation(i, "operation")
            .getConversationSequence();
        assertEquals(ConversationSequence.CONVERSATION_NONE, seq);
    }
View Full Code Here

     */
    @SuppressWarnings("unchecked")
    private void conversationPostInvoke(Message msg) throws TargetDestructionException {
        if (conversational) {      
            Operation operation = msg.getOperation();
            ConversationSequence sequence = operation.getConversationSequence();
            if (sequence == ConversationSequence.CONVERSATION_END) {
                // in some cases the ConversationID that should be used comes in with the
                // message, e.g. when ws binding is in use.
                Object convID = msg.getFrom().getReferenceParameters().getConversationID();
                if (convID != null) {
View Full Code Here

                getActualTypes(method.getGenericParameterTypes(), method.getParameterTypes(), typeBindings);
            Class<?>[] faultTypes =
                getActualTypes(method.getGenericExceptionTypes(), method.getExceptionTypes(), typeBindings);

            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

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.