Package org.apache.cxf.phase

Examples of org.apache.cxf.phase.PhaseManagerImpl


        CachedStream originalEmptyOs = new CachedStream();
       
        XMLStreamWriter writer = StaxUtils.createXMLStreamWriter(originalEmptyOs);
        message.setContent(XMLStreamWriter.class, writer);

        InterceptorChain chain = new PhaseInterceptorChain((new PhaseManagerImpl()).getOutPhases());
        //Interceptors after SOAPHandlerInterceptor DOMXMLStreamWriter to write
        chain.add(new AbstractProtocolHandlerInterceptor<SoapMessage>(binding, Phase.MARSHAL) {

            public void handleMessage(SoapMessage message) throws Fault {
                try {
View Full Code Here


        // This is to set direction to outbound
        expect(exchange.getOutMessage()).andReturn(message).anyTimes();
        CachedStream originalEmptyOs = new CachedStream();
        message.setContent(OutputStream.class, originalEmptyOs);

        InterceptorChain chain = new PhaseInterceptorChain((new PhaseManagerImpl()).getOutPhases());
        //Interceptors after SOAPHandlerInterceptor DOMXMLStreamWriter to write
        chain.add(new AbstractProtocolHandlerInterceptor<SoapMessage>(binding, Phase.MARSHAL) {

            public void handleMessage(SoapMessage message) throws Fault {
                try {
View Full Code Here

    }

    private Exchange getExchange() {
        Bus bus = control.createMock(Bus.class);
        bus.getExtension(PhaseManager.class);
        EasyMock.expectLastCall().andReturn(new PhaseManagerImpl()).anyTimes();
       
        Exchange exchange = control.createMock(Exchange.class);
        exchange.get(Bus.class);
        EasyMock.expectLastCall().andReturn(bus).anyTimes();
        EasyMock.expect(exchange.isEmpty()).andReturn(true).anyTimes();
View Full Code Here

    }

    private Exchange getExchange() {
        Bus bus = control.createMock(Bus.class);
        bus.getExtension(PhaseManager.class);
        EasyMock.expectLastCall().andReturn(new PhaseManagerImpl()).anyTimes();
       
        Exchange exchange = control.createMock(Exchange.class);
        exchange.get(Bus.class);
        EasyMock.expectLastCall().andReturn(bus).anyTimes();
        //Exchange exchange = new ExchangeImpl();
View Full Code Here

        phases = new ArrayList<Phase>();
        phases.add(new Phase(Phase.SEND, 1000));
        empty = new ArrayList<Interceptor<? extends Message>>();

        bus = control.createMock(Bus.class);
        PhaseManager pm = new PhaseManagerImpl();
        EasyMock.expect(bus.getExtension(PhaseManager.class)).andReturn(pm).anyTimes();

        service = control.createMock(Service.class);
        endpoint = control.createMock(Endpoint.class);
        binding = control.createMock(Binding.class);
View Full Code Here

    public void testInvokeInboundChain() {
        //Reset Exchange on msg
        msg.setExchange(null);
        Bus bus = setupBus();
        colocOut.setBus(bus);
        PhaseManager pm = new PhaseManagerImpl();
        EasyMock.expect(bus.getExtension(PhaseManager.class)).andReturn(pm).times(2);

        Endpoint ep = control.createMock(Endpoint.class);
        Binding  bd = control.createMock(Binding.class);
        Service srv = control.createMock(Service.class);
View Full Code Here

        EasyMock.expect(oi.getInput()).andReturn(mi);

        EasyMock.expect(ep.getService()).andReturn(srv).anyTimes();
        EasyMock.expect(
            bus.getExtension(PhaseManager.class)).andReturn(
                                      new PhaseManagerImpl()).times(2);
        EasyMock.expect(bus.getInInterceptors()).andReturn(new ArrayList<Interceptor<? extends Message>>());
        EasyMock.expect(ep.getInInterceptors()).andReturn(new ArrayList<Interceptor<? extends Message>>());
        EasyMock.expect(srv.getInInterceptors()).andReturn(new ArrayList<Interceptor<? extends Message>>());

        control.replay();
View Full Code Here

        BusFactory.setDefaultBus(null);
    }

    @Test
    public void testSetColocInPhases() throws Exception {
        PhaseManagerImpl phaseMgr = new PhaseManagerImpl();
        SortedSet<Phase> list = phaseMgr.getInPhases();
        int size1 = list.size();
        ColocUtil.setPhases(list, Phase.USER_LOGICAL, Phase.INVOKE);

        assertNotSame("The list size should not be same",
                      size1, list.size());
View Full Code Here

                     Phase.INVOKE);
    }

    @Test
    public void testSetColocOutPhases() throws Exception {
        PhaseManagerImpl phaseMgr = new PhaseManagerImpl();

        SortedSet<Phase> list = phaseMgr.getOutPhases();
        int size1 = list.size();
        ColocUtil.setPhases(list, Phase.SETUP, Phase.POST_LOGICAL);

        assertNotSame("The list size should not be same",
                      size1, list.size());
View Full Code Here

    }
   
    @Test
    public void testGetOutInterceptorChain() throws Exception {
        PhaseManagerImpl phaseMgr = new PhaseManagerImpl();
        SortedSet<Phase> list = phaseMgr.getInPhases();
        ColocUtil.setPhases(list, Phase.SETUP, Phase.POST_LOGICAL);
       
        Endpoint ep = control.createMock(Endpoint.class);
        Service srv = control.createMock(Service.class);
        Exchange ex = new ExchangeImpl();
View Full Code Here

TOP

Related Classes of org.apache.cxf.phase.PhaseManagerImpl

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.