Examples of InterceptorChain


Examples of com.arjuna.webservices.InterceptorChain

        try
        {
            if (interceptorHandlers.size() > 0)
            {
                final Iterator interceptorHandlerIter = interceptorHandlers.iterator() ;
                InterceptorChain interceptorChain = new InterceptorBodyHandler(bodyHandler) ;
                do
                {
                    final InterceptorHandler handler = (InterceptorHandler)interceptorHandlerIter.next();
                    interceptorChain = new InterceptorChainHandler(interceptorChain, handler) ;
                }
                while (interceptorHandlerIter.hasNext()) ;
               
                return interceptorChain.invokeNext(soapService, soapDetails, messageContext, messageResponseContext, action, streamReader) ;
            }
            else
            {
                return bodyHandler.invoke(soapDetails, messageContext, messageResponseContext, action, streamReader) ;
            }
View Full Code Here

Examples of com.blogger.tcuri.appserver.interceptor.InterceptorChain

            logger.info("404 Not found Action class(" + className + ")");
            return;
        }

        try {
            InterceptorChain lastChain = new InterceptorChain(action, null,
                    null);
            InterceptorChain chain = lastChain;
            for (Interceptor interceptor : interceptorList) {
                chain = new InterceptorChain(action, interceptor, chain);
            }
            Resolution resolution = chain.execute();
            resolution.execute(context);
        } catch (Exception e) {
            // システムエラー
            context.sendResponseHeaders(500, 0);
            context.sendMessage("Internal Server Error.");
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        // TODO check if the message is one-way message
        // Get the method name from the soap endpoint
        org.apache.cxf.message.Message outMessage = CxfSoapBinding.getCxfOutMessage(
                endpoint.getHeaderFilterStrategy(), exchange, false);
        org.apache.cxf.message.Exchange cxfExchange = outMessage.getExchange();
        InterceptorChain chain = OutgoingChainInterceptor.getOutInterceptorChain(cxfExchange);
        outMessage.setInterceptorChain(chain);
        chain.doIntercept(outMessage);
        CachedOutputStream outputStream = (CachedOutputStream)outMessage.getContent(OutputStream.class);
        exchange.getOut().setBody(outputStream.getInputStream());
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

                                                            partialResponse,
                                                            reference);

                if (backChannel != null) {
                    // set up interceptor chains and send message
                    InterceptorChain chain =
                        fullResponse != null
                        ? fullResponse.getInterceptorChain()
                        : OutgoingChainInterceptor.getOutInterceptorChain(exchange);
                    partialResponse.setInterceptorChain(chain);
                    exchange.put(ConduitSelector.class,
                                 new PreexistingConduitSelector(backChannel,
                                                                exchange.get(Endpoint.class)));

                    if (chain != null && !chain.doIntercept(partialResponse)
                        && partialResponse.getContent(Exception.class) != null) {
                        if (partialResponse.getContent(Exception.class) instanceof Fault) {
                            throw (Fault)partialResponse.getContent(Exception.class);
                        } else {
                            throw new Fault(partialResponse.getContent(Exception.class));
                        }
                    }
                    if (chain != null) {
                        chain.reset();                       
                    }
                    exchange.put(ConduitSelector.class, new NullConduitSelector());
                    if (fullResponse != null) {
                        exchange.setOutMessage(fullResponse);
                    } else {
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EasyMock.expect(pe.getEffectiveClientRequestPolicy(ei, boi, conduit))
            .andReturn(effectivePolicy);
        List<Interceptor<? extends Message>> li = createMockInterceptorList();
        EasyMock.expect(effectivePolicy.getInterceptors())
            .andReturn(li);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic);
        ic.add(li.get(0));
        EasyMock.expectLastCall();
        Collection<PolicyAssertion> assertions =
            CastUtils.cast(Collections.EMPTY_LIST, PolicyAssertion.class);
        EasyMock.expect(effectivePolicy.getChosenAlternative()).andReturn(assertions);
        control.replay();
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EasyMock.expect(effectivePolicy.getPolicy()).andReturn(new Policy()).times(2);
        Interceptor<? extends Message> i = control.createMock(Interceptor.class);
        List<Interceptor<? extends Message>> lst = new ArrayList<Interceptor<? extends Message>>();
        lst.add(i);
        EasyMock.expect(effectivePolicy.getInterceptors()).andReturn(lst);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic).anyTimes();
        ic.add(i);
        EasyMock.expectLastCall();
        message.put(EasyMock.eq(AssertionInfoMap.class), EasyMock.isA(AssertionInfoMap.class));
        EasyMock.expectLastCall();
        ic.add(PolicyVerificationInInterceptor.INSTANCE);
        control.replay();
        interceptor.handleMessage(message);
        control.verify();       
    }
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EndpointPolicy endpointPolicy = control.createMock(EndpointPolicy.class);
        EasyMock.expect(pe.getClientEndpointPolicy(ei, conduit)).andReturn(endpointPolicy);
        List<Interceptor<? extends Message>> li = createMockInterceptorList();
        EasyMock.expect(endpointPolicy.getFaultInterceptors())
            .andReturn(li);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic);
        ic.add(li.get(0));
        EasyMock.expectLastCall();
        Collection<PolicyAssertion> assertions =
            CastUtils.cast(Collections.EMPTY_LIST, PolicyAssertion.class);
        EasyMock.expect(endpointPolicy.getFaultVocabulary()).andReturn(assertions);
        control.replay();
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EndpointPolicy endpointPolicy = control.createMock(EndpointPolicyImpl.class);
        EasyMock.expect(pe.getServerEndpointPolicy(ei, destination)).andReturn(endpointPolicy);
        List<Interceptor<? extends Message>> li = createMockInterceptorList();
        EasyMock.expect(endpointPolicy.getInterceptors())
            .andReturn(li);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic);
        ic.add(li.get(0));
        EasyMock.expectLastCall();
        Collection<PolicyAssertion> assertions =
            CastUtils.cast(Collections.EMPTY_LIST, PolicyAssertion.class);
        EasyMock.expect(endpointPolicy.getVocabulary()).andReturn(assertions);
        control.replay();
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EasyMock.expect(pe.getEffectiveServerResponsePolicy(ei, boi, destination))
            .andReturn(effectivePolicy);
        List<Interceptor<? extends Message>> li = createMockInterceptorList();
        EasyMock.expect(effectivePolicy.getInterceptors())
            .andReturn(li);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic);
        ic.add(li.get(0));
        EasyMock.expectLastCall();
        Collection<PolicyAssertion> assertions =
            CastUtils.cast(Collections.EMPTY_LIST, PolicyAssertion.class);
        EasyMock.expect(effectivePolicy.getChosenAlternative()).andReturn(assertions);
        control.replay();
View Full Code Here

Examples of org.apache.cxf.interceptor.InterceptorChain

        EasyMock.expect(pe.getEffectiveServerFaultPolicy(ei, bfi, destination))
            .andReturn(effectivePolicy);
        List<Interceptor<? extends Message>> li = createMockInterceptorList();
        EasyMock.expect(effectivePolicy.getInterceptors())
            .andReturn(li);
        InterceptorChain ic = control.createMock(InterceptorChain.class);
        EasyMock.expect(message.getInterceptorChain()).andReturn(ic);
        ic.add(li.get(0));
        EasyMock.expectLastCall();
        Collection<PolicyAssertion> assertions =
            CastUtils.cast(Collections.EMPTY_LIST, PolicyAssertion.class);
        EasyMock.expect(effectivePolicy.getChosenAlternative()).andReturn(assertions);
        control.replay();
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.