Package org.apache.tuscany.sca.invocation

Examples of org.apache.tuscany.sca.invocation.InvocationChain.addInterceptor()


        Interceptor inter3 = new MockInterceptor();
        Interceptor inter4 = new MockInterceptor();
        chain.addInterceptor(inter3); // SERVICE
        chain.addInterceptor(Phase.IMPLEMENTATION_POLICY, inter4);
        chain.addInterceptor(Phase.SERVICE_POLICY, inter2);
        chain.addInterceptor(Phase.SERVICE_BINDING, inter1);
        Interceptor head = (Interceptor)chain.getHeadInvoker();
        assertEquals(inter1, head);
        assertEquals(inter2, inter1.getNext());
        assertEquals(inter3, inter2.getNext());
        assertEquals(inter4, inter3.getNext());
View Full Code Here


     */
    public void configure() {
        InvocationChain bindingChain = endpointReference.getBindingInvocationChain();
        
        // add transport interceptor
        bindingChain.addInterceptor(Phase.REFERENCE_BINDING_TRANSPORT,
                                    new TransportReferenceInterceptor());
       
    }
   
    // Reference specific utility operations
View Full Code Here

    public void configure() {
       
        InvocationChain bindingChain = endpoint.getBindingInvocationChain();
       
        // add transport interceptor
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_TRANSPORT,
                                    new TransportServiceInterceptor(registry, jmsBinding,
                                                                    jmsResourceFactory,
                                                                    endpoint) );

        // add operation selector interceptor
View Full Code Here

                                    new TransportServiceInterceptor(registry, jmsBinding,
                                                                    jmsResourceFactory,
                                                                    endpoint) );

        // add operation selector interceptor
        bindingChain.addInterceptor(operationSelectorProvider.getPhase(),
                                    operationSelectorProvider.createInterceptor());

        // add operationProperties interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_OPERATION_SELECTOR,
                                    new OperationPropertiesInterceptor(jmsBinding, endpoint));
View Full Code Here

        // add operation selector interceptor
        bindingChain.addInterceptor(operationSelectorProvider.getPhase(),
                                    operationSelectorProvider.createInterceptor());

        // add operationProperties interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_OPERATION_SELECTOR,
                                    new OperationPropertiesInterceptor(jmsBinding, endpoint));

        // add callback destination interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new CallbackDestinationInterceptor(endpoint));
View Full Code Here

        // add operationProperties interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_OPERATION_SELECTOR,
                                    new OperationPropertiesInterceptor(jmsBinding, endpoint));

        // add callback destination interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new CallbackDestinationInterceptor(endpoint));

        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(registry, jmsBinding));

        // add async response interceptor after header interceptor
View Full Code Here

        // add callback destination interceptor after operation selector
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new CallbackDestinationInterceptor(endpoint));

        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(registry, jmsBinding));

        // add async response interceptor after header interceptor
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new AsyncResponseDestinationInterceptor(endpoint, registry) );
View Full Code Here

                                    new CallbackDestinationInterceptor(endpoint));

        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(registry, jmsBinding));

        // add async response interceptor after header interceptor
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new AsyncResponseDestinationInterceptor(endpoint, registry) );

        // add request wire format
        bindingChain.addInterceptor(requestWireFormatProvider.getPhase(),
                                    requestWireFormatProvider.createInterceptor());
View Full Code Here

        // add async response interceptor after header interceptor
        bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
                                    new AsyncResponseDestinationInterceptor(endpoint, registry) );

        // add request wire format
        bindingChain.addInterceptor(requestWireFormatProvider.getPhase(),
                                    requestWireFormatProvider.createInterceptor());
       
        // add response wire format, but only add it if it's different from the request
        if (!jmsBinding.getRequestWireFormat().equals(jmsBinding.getResponseWireFormat())){
            bindingChain.addInterceptor(responseWireFormatProvider.getPhase(),
View Full Code Here

        bindingChain.addInterceptor(requestWireFormatProvider.getPhase(),
                                    requestWireFormatProvider.createInterceptor());
       
        // add response wire format, but only add it if it's different from the request
        if (!jmsBinding.getRequestWireFormat().equals(jmsBinding.getResponseWireFormat())){
            bindingChain.addInterceptor(responseWireFormatProvider.getPhase(),
                                        responseWireFormatProvider.createInterceptor());
        }
       
    }
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.