Package org.apache.cxf.phase

Examples of org.apache.cxf.phase.Phase


    public void setUp() {
        control = EasyMock.createNiceControl();
    }
   
    public void testOrdering() {
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(Collections.singletonList(p));
        MAPAggregator map = new MAPAggregator();
        RMOutInterceptor rmi = new RMOutInterceptor();       
        chain.add(rmi);
View Full Code Here


   
    protected ServiceInfo serviceInfo;
   
    public void setUp() throws Exception {
        List<Phase> phases = new ArrayList<Phase>();
        Phase phase1 = new Phase("phase1", 1);
        Phase phase2 = new Phase("phase2", 2);
        Phase phase3 = new Phase("phase3", 3);
        phases.add(phase1);
        phases.add(phase2);
        phases.add(phase3);
        chain = new PhaseInterceptorChain(phases);
View Full Code Here

        super.setUp();

        control = EasyMock.createNiceControl();

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

        bus = control.createMock(Bus.class);
        PhaseManager pm = control.createMock(PhaseManager.class);
        EasyMock.expect(bus.getExtension(PhaseManager.class)).andReturn(pm);
View Full Code Here

   

    @Before
    public void setUp() throws Exception {
        SortedSet<Phase> phases = new TreeSet<Phase>();
        Phase phase1 = new Phase("phase1", 1);
        Phase phase2 = new Phase("phase2", 2);
        Phase phase3 = new Phase("phase3", 3);
        Phase phase4 = new Phase(Phase.WRITE_ENDING, 4);
        phases.add(phase1);
        phases.add(phase2);
        phases.add(phase3);
        phases.add(phase4);
        phases.add(new Phase(Phase.POST_LOGICAL, 5));
        phases.add(new Phase(Phase.INVOKE, 6));
        chain = new PhaseInterceptorChain(phases);

        soapMessage = TestUtil.createEmptySoapMessage(Soap11.getInstance(), chain);
    }
View Full Code Here

    protected ServiceInfo serviceInfo;
   
    @Before
    public void setUp() throws Exception {
        SortedSet<Phase> phases = new TreeSet<Phase>();
        Phase phase1 = new Phase("phase1", 1);
        Phase phase2 = new Phase("phase2", 2);
        Phase phase3 = new Phase("phase3", 3);
        phases.add(phase1);
        phases.add(phase2);
        phases.add(phase3);
        chain = new PhaseInterceptorChain(phases);
View Full Code Here

    @Test
    public void testOrder() throws Exception {
        //make sure the interceptors get ordered correctly
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(new Phase(Phase.PRE_PROTOCOL, 1));
       
        List<Interceptor> lst = new ArrayList<Interceptor>();
        lst.add(new MustUnderstandInterceptor());
        lst.add(new WSS4JInInterceptor());
        lst.add(new SAAJInInterceptor());
View Full Code Here

        */

        // behaviour is identicial for all phases
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();       
       
        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                break;
            }            
            testFail(location);
        }
    }
View Full Code Here

        }
       
        // test failure in phases before Phase.PRE_LOGICAL
       
        Iterator<Phase> it = inPhases.iterator();
        Phase p = null;
        FaultLocation location = new org.apache.cxf.greeter_control.types.ObjectFactory()
            .createFaultLocation();
        location.setAfter(MAPAggregator.class.getName());
       
        // test failure occuring before logical addressing interceptor

        while (it.hasNext()) {
            p = it.next();
            location.setPhase(p.getName());
            if (Phase.PRE_LOGICAL.equals(p.getName())) {
                break;
            }  
            testFail(location, true);
        }
       
        // test failure occuring after logical addressing interceptor -
        // won't get a fault in case of oneways (partial response already sent)
       
        do
            location.setPhase(p.getName());
            if (Phase.INVOKE.equals(p.getName())) {
                break;
            }            
            testFail(location, true);
            p = it.hasNext() ? it.next() : null;
        } while (null != p);
View Full Code Here

    }
   
    @Test
    public void testOrdering() {
        control.replay();
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

        control = EasyMock.createNiceControl();
    }
   
    @Test
    public void testOrdering() {
        Phase p = new Phase(Phase.PRE_LOGICAL, 1);
        SortedSet<Phase> phases = new TreeSet<Phase>();
        phases.add(p);
        PhaseInterceptorChain chain =
            new PhaseInterceptorChain(phases);
        MAPAggregator map = new MAPAggregator();
View Full Code Here

TOP

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

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.