Package org.servicemix.ws.xmlbeans.rm

Examples of org.servicemix.ws.xmlbeans.rm.SequenceAcknowledgementDocument$SequenceAcknowledgement$Factory


     * @param exposed (non-<code>null</code>)
     * @return converted
     */
    public static SequenceAcknowledgement
    convert(org.apache.cxf.ws.rm.v200502wsa15.SequenceAcknowledgement exposed) {
        SequenceAcknowledgement internal = new SequenceAcknowledgement();
        internal.setIdentifier(convert(exposed.getIdentifier()));
        List<SequenceAcknowledgement.AcknowledgementRange> internalRanges
            = internal.getAcknowledgementRange();
        for (org.apache.cxf.ws.rm.v200502wsa15.SequenceAcknowledgement.AcknowledgementRange range
            : exposed.getAcknowledgementRange()) {
            SequenceAcknowledgement.AcknowledgementRange internalRange
                = new SequenceAcknowledgement.AcknowledgementRange();
            internalRange.setLower(range.getLower());
            internalRange.setUpper(range.getUpper());
            internalRanges.add(internalRange);
            putAll(range.getOtherAttributes(), internalRange.getOtherAttributes());
        }
        addAll(exposed.getAny(), internal.getAny());
        putAll(exposed.getOtherAttributes(), internal.getOtherAttributes());
        return internal;
    }
View Full Code Here


        EasyMock.expect(manager.getDeliveryAssurance()).andReturn(da).anyTimes();
        EasyMock.expect(da.isSetAtMostOnce()).andReturn(false).anyTimes();
        EasyMock.expect(da.isSetAtLeastOnce()).andReturn(true).anyTimes();
        EasyMock.expect(da.isSetInOrder()).andReturn(true).anyTimes();
       
        SequenceAcknowledgement ack = factory.createSequenceAcknowledgement();
        List<AcknowledgementRange> ranges = new ArrayList<AcknowledgementRange>();
       
        final AcknowledgementRange r =
            factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setUpper(new Long(messages.length));
View Full Code Here

     * @param exposed (non-<code>null</code>)
     * @return converted
     */
    public static SequenceAcknowledgement
    convert(org.apache.cxf.ws.rm.v200502.SequenceAcknowledgement exposed) {
        SequenceAcknowledgement internal = new SequenceAcknowledgement();
        internal.setIdentifier(convert(exposed.getIdentifier()));
        List<SequenceAcknowledgement.AcknowledgementRange> internalRanges
            = internal.getAcknowledgementRange();
        for (org.apache.cxf.ws.rm.v200502.SequenceAcknowledgement.AcknowledgementRange range
            : exposed.getAcknowledgementRange()) {
            SequenceAcknowledgement.AcknowledgementRange internalRange
                = new SequenceAcknowledgement.AcknowledgementRange();
            internalRange.setLower(range.getLower());
            internalRange.setUpper(range.getUpper());
            internalRanges.add(internalRange);
            putAll(range.getOtherAttributes(), internalRange.getOtherAttributes());
        }
        addAll(exposed.getAny(), internal.getAny());
        putAll(exposed.getOtherAttributes(), internal.getOtherAttributes());
        return internal;
    }
View Full Code Here

        offeringId = oi;

        currentMessageNumber = cmn;
        lastMessage = lm;
        acknowledgement = new SequenceAcknowledgement();
        acknowledgement.setIdentifier(id);
    }
View Full Code Here

   
    public void addAck(DestinationSequence seq) {
        if (null == acks) {
            acks = new ArrayList<SequenceAcknowledgement>();
        }
        SequenceAcknowledgement ack = seq.getAcknowledgment();
        acks.add(ack);
        seq.acknowledgmentSent();
    }
View Full Code Here

        manager = control.createMock(RMManager.class);
        Source source = control.createMock(Source.class);
        rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();
        interceptor.setManager(manager);
        SequenceAcknowledgement ack1 = control.createMock(SequenceAcknowledgement.class);
        SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
        Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
        acks.add(ack1);
        acks.add(ack2);
        EasyMock.expect(rmps.getAcks()).andReturn(acks);
        Identifier id1 = control.createMock(Identifier.class);
        EasyMock.expect(ack1.getIdentifier()).andReturn(id1);
        SourceSequence ss1 = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getSequence(id1)).andReturn(ss1);
        ss1.setAcknowledged(ack1);
        EasyMock.expectLastCall();
        Identifier id2 = control.createMock(Identifier.class);
        EasyMock.expect(ack2.getIdentifier()).andReturn(id2);
        EasyMock.expect(source.getSequence(id2)).andReturn(null);
        control.replay();
        try {
            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
            fail("Expected SequenceFault not thrown");
View Full Code Here

    public void testSetAcknowledged() throws RMException {
        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
        setUpSource();
        seq.setSource(source);
       
        SequenceAcknowledgement ack = seq.getAcknowledgement();
        ack = factory.createSequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange r =
            factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(new Long(1));
        r.setUpper(new Long(2));
        ack.getAcknowledgementRange().add(r);
        r = factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(new Long(4));
        r.setUpper(new Long(6));
        ack.getAcknowledgementRange().add(r);
        r = factory.createSequenceAcknowledgementAcknowledgementRange();
        r.setLower(new Long(8));
        r.setUpper(new Long(10));
        ack.getAcknowledgementRange().add(r);
        rq.purgeAcknowledged(seq);
        EasyMock.expectLastCall();
       
        control.replay();
        seq.setAcknowledged(ack);
        assertSame(ack, seq.getAcknowledgement());
        assertEquals(3, ack.getAcknowledgementRange().size());
        assertTrue(!seq.isAcknowledged(3))
        assertTrue(seq.isAcknowledged(5));
        control.verify();
    }
View Full Code Here

        // Is this message comming out of order??       
        if( intValue!=s.lastMessageAcked+1) {
            // This implementation is really simple and just drops out of order
            // messages.
           
            SequenceAcknowledgementDocument resultDoc = SequenceAcknowledgementDocument.Factory.newInstance();
            SequenceAcknowledgement acknowledgement = resultDoc.addNewSequenceAcknowledgement();
            acknowledgement.setIdentifier(sequence.getIdentifier());
            if( s.lastMessageAcked> 0 ) {
                AcknowledgementRange range = acknowledgement.addNewAcknowledgementRange();
                range.setLower(BigInteger.ONE);
                range.setUpper(new BigInteger(""+s.lastMessageAcked));
View Full Code Here

            s.lastMessageNumber = value;
        }
       
        sequenceStore.update(s);
       
        SequenceAcknowledgementDocument resultDoc = SequenceAcknowledgementDocument.Factory.newInstance();
        SequenceAcknowledgement acknowledgement = resultDoc.addNewSequenceAcknowledgement();
        acknowledgement.setIdentifier(sequence.getIdentifier());
        AcknowledgementRange range = acknowledgement.addNewAcknowledgementRange();
        range.setLower(BigInteger.ONE);
        range.setUpper(new BigInteger(""+s.lastMessageAcked));
       
View Full Code Here

                    "Sender",
                    "wsrm:UnknownSequence",
                    sequence.getIdentifier().xmlText());
        }
       
        SequenceAcknowledgementDocument resultDoc = SequenceAcknowledgementDocument.Factory.newInstance();
        SequenceAcknowledgement acknowledgement = resultDoc.addNewSequenceAcknowledgement();
        acknowledgement.setIdentifier(sequence.getIdentifier());
        if( s.lastMessageAcked> 0 ) {
            AcknowledgementRange range = acknowledgement.addNewAcknowledgementRange();
            range.setLower(BigInteger.ONE);
            range.setUpper(new BigInteger(""+s.lastMessageAcked));
View Full Code Here

TOP

Related Classes of org.servicemix.ws.xmlbeans.rm.SequenceAcknowledgementDocument$SequenceAcknowledgement$Factory

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.