Package org.apache.cxf.ws.rm.persistence

Examples of org.apache.cxf.ws.rm.persistence.RMStore


                }
            }
            LOG.fine("Completed purging resend candidates.");
        }
        if (purged.size() > 0) {
            RMStore store = manager.getStore();
            if (null != store) {
                store.removeMessages(seq.getIdentifier(), purged, true);
            }
        }
    }
View Full Code Here


                }
            }
            LOG.fine("Completed purging resend candidates.");
        }
        if (purged.size() > 0) {
            RMStore store = manager.getStore();
            if (null != store) {
                store.removeMessages(seq.getIdentifier(), purged, true);
            }
        }
    }
View Full Code Here

    public void testPurgeAcknowledged() {
        destination = control.createMock(Destination.class);
        DestinationSequence seq = new DestinationSequence(id, ref, destination);       
        manager = control.createMock(RMManager.class);
        EasyMock.expect(destination.getManager()).andReturn(manager);
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(manager.getStore()).andReturn(store);
        store.removeMessages(EasyMock.eq(id),
            CastUtils.cast(EasyMock.isA(Collection.class), Long.class), EasyMock.eq(false));
        EasyMock.expectLastCall();
        control.replay();
        seq.purgeAcknowledged(1);
        control.verify();
View Full Code Here

        EasyMock.expect(ds.getIdentifier()).andReturn(id).times(3);
        String sid = "s1";
        EasyMock.expect(id.getValue()).andReturn(sid).times(3);
        RMManager manager = control.createMock(RMManager.class);
        EasyMock.expect(rme.getManager()).andReturn(manager).times(2);       
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(manager.getStore()).andReturn(store).times(2);
        store.createDestinationSequence(ds);
        EasyMock.expectLastCall();
        store.removeDestinationSequence(id);
        EasyMock.expectLastCall();
        control.replay();
        destination.addSequence(ds);
        assertEquals(1, destination.getAllSequences().size());
        assertSame(ds, destination.getSequence(id));
View Full Code Here

        EasyMock.expect(acksToURI.getValue()).andReturn(acksToAddress);
        EasyMock.expect(ds.canPiggybackAckOnPartialResponse()).andReturn(false);
        EasyMock.expect(destination.getReliableEndpoint()).andReturn(rme).times(2);
        RMManager manager = control.createMock(RMManager.class);
        EasyMock.expect(rme.getManager()).andReturn(manager);
        RMStore store = control.createMock(RMStore.class);
        EasyMock.expect(manager.getStore()).andReturn(store);
        Proxy proxy = control.createMock(Proxy.class);
        EasyMock.expect(rme.getProxy()).andReturn(proxy);
        proxy.acknowledge(ds);
        EasyMock.expectLastCall();
View Full Code Here

        assertNull(manager.getStore());
        assertNull(manager.getRetransmissionQueue());
        assertNotNull(manager.getTimer());

        Bus bus = control.createMock(Bus.class);
        RMStore store = control.createMock(RMStore.class);
        RetransmissionQueue queue = control.createMock(RetransmissionQueue.class);
       
        manager.setBus(bus);
        manager.setStore(store);
        manager.setRetransmissionQueue(queue);
View Full Code Here

        manager.recoverReliableEndpoint(endpoint, conduit);
        control.verify();
       
        control.reset();
       
        RMStore store = control.createMock(RMStore.class);
        manager.setStore(store);
      
        control.replay();
        manager.recoverReliableEndpoint(endpoint, conduit);
        control.verify();          
View Full Code Here

   
    void setUpRecoverReliableEndpoint(Endpoint endpoint,
                                      Conduit conduit,
                                      SourceSequence ss,
                                      DestinationSequence ds, RMMessage m)  {               
        RMStore store = control.createMock(RMStore.class);
        RetransmissionQueue queue = control.createMock(RetransmissionQueue.class);
        manager.setStore(store);
        manager.setRetransmissionQueue(queue);
       
        Collection<SourceSequence> sss = new ArrayList<SourceSequence>();
        if (null != ss) {
            sss.add(ss);           
        }
        EasyMock.expect(store.getSourceSequences("{S}s.{P}p")).andReturn(sss);
        if (null == ss) {
            return;
        }        
       
        Collection<DestinationSequence> dss = new ArrayList<DestinationSequence>();
        if (null != ds) {
            dss.add(ds);           
        }
        EasyMock.expect(store.getDestinationSequences("{S}s.{P}p")).andReturn(dss);
        if (null == ds) {
            return;
        }
        Collection<RMMessage> ms = new ArrayList<RMMessage>();
        if (null != m) {
            ms.add(m);
        }
        Identifier id = new Identifier();
        id.setValue("S1");
        EasyMock.expect(ss.getIdentifier()).andReturn(id).times(null == m ? 1 : 2);
        EasyMock.expect(store.getMessages(id, true)).andReturn(ms);
       
       
        manager.setReliableEndpointsMap(new HashMap<Endpoint, RMEndpoint>());
        RMEndpoint rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(manager.createReliableEndpoint(endpoint)).andReturn(rme);
View Full Code Here

        }

        message.put(RMMessageConstants.SAVED_CONTENT, saved);
        manager.getRetransmissionQueue().addUnacknowledged(message);
       
        RMStore store = manager.getStore();
        if (null != store) {
            Source s = manager.getSource(message);
            RMProperties rmps = RMContextUtils.retrieveRMProperties(message, true);
            Identifier sid = rmps.getSequence().getIdentifier();
            SourceSequence ss = s.getSequence(sid);
            RMMessage msg = new RMMessage();
            msg.setMessageNumber(rmps.getSequence().getMessageNumber());
            if (!MessageUtils.isRequestor(message)) {
                AddressingProperties maps = RMContextUtils.retrieveMAPs(message, false, true);
                if (null != maps && null != maps.getTo()) {
                    msg.setTo(maps.getTo().getValue());
                }
            }
            msg.setContent(saved);
            store.persistOutgoing(ss, msg);
        }
    }
View Full Code Here

    public void addSequence(DestinationSequence seq, boolean persist) {
        seq.setDestination(this);
        map.put(seq.getIdentifier().getValue(), seq);
        if (persist) {
            RMStore store = getReliableEndpoint().getManager().getStore();
            if (null != store) {
                store.createDestinationSequence(seq);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.rm.persistence.RMStore

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.