Examples of SequenceType


Examples of org.objectweb.celtix.ws.rm.SequenceType

       
        control.replay();
        rmps.setSequence(seq);
        control.verify();
       
        SequenceType s = rmps.getSequence();
        assertNotNull(s);
        assertSame(s.getIdentifier(), sid);
        assertEquals(s.getMessageNumber(), BigInteger.TEN);
        assertNull(s.getLastMessage());
       
        control.reset();
       
        seq.getIdentifier();
        expectLastCall().andReturn(sid);
        seq.getCurrentMessageNr();
        expectLastCall().andReturn(BigInteger.TEN);
        seq.isLastMessage();
        expectLastCall().andReturn(true);
       
        control.replay();
        rmps.setSequence(seq);
        control.verify();
       
        s = rmps.getSequence();
        assertNotNull(s);
        assertSame(s.getIdentifier(), sid);
        assertEquals(s.getMessageNumber(), BigInteger.TEN);
        assertNotNull(s.getLastMessage());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

        control.replay();
        RMDestination d = new RMDestination(handler);
        Identifier sid = d.generateSequenceIdentifier();
        DestinationSequence seq = new DestinationSequence(sid, address, d);
        d.addSequence(seq);
        SequenceType st = RMUtils.getWSRMFactory().createSequenceType();
        st.setIdentifier(sid);
        BigInteger m = new BigInteger("3");
        st.setMessageNumber(m);
        d.acknowledge(st, RMUtils.getAddressingConstants().getNoneURI());
       
        Identifier unknown = d.generateSequenceIdentifier();
        st.setIdentifier(unknown);
        try {
            d.acknowledge(st, RMUtils.getAddressingConstants().getNoneURI());
            fail("Expected sequenceFault not thrown.");
        } catch (SequenceFault sf) {
            assertEquals("UnknownSequence", sf.getFaultInfo().getFaultCode().getLocalPart());
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

        if (context != null) {
            context.get(RM_PROPERTIES_OUTBOUND);
            EasyMock.expectLastCall().andReturn(rmps);
        }
        properties.add(rmps);
        SequenceType sequence = control.createMock(SequenceType.class);
        if (context != null) {
            rmps.getSequence();
            EasyMock.expectLastCall().andReturn(sequence);
        }
        if (messageNumber != null) {
            sequence.getMessageNumber();
            EasyMock.expectLastCall().andReturn(messageNumber);
        } else {
            Identifier id = control.createMock(Identifier.class);
            sequence.getIdentifier();
            EasyMock.expectLastCall().andReturn(id);
            id.getValue();
            EasyMock.expectLastCall().andReturn(sid);
            identifiers.add(id);
        }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

    public void testAddUnacknowledged() {
        ObjectMessageContext ctx = new ObjectMessageContextImpl();
        AddressingProperties maps = new AddressingPropertiesImpl();
        ctx.put(CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, maps);
        RMPropertiesImpl rmps = new RMPropertiesImpl();
        SequenceType seq = control.createMock(SequenceType.class);
        Identifier sid = control.createMock(Identifier.class);
        rmps.setSequence(seq);
        RMContextUtils.storeRMProperties(ctx, rmps, true);  
        SourceSequence ss = control.createMock(SourceSequence.class);
        RMMessage msg = control.createMock(RMMessage.class);
        AbstractClientBinding binding = control.createMock(AbstractClientBinding.class);
        handler.getBinding();
        expectLastCall().andReturn(binding);
        ObjectMessageContext clonedCtx =  new ObjectMessageContextImpl();
        binding.createObjectContext();
        expectLastCall().andReturn(clonedCtx);
        msg.getContext();       
        expectLastCall().andReturn(ctx);
        seq.getIdentifier();
        expectLastCall().andReturn(sid);
        RMStore store = control.createMock(RMStore.class);
        handler.getStore();
        expectLastCall().andReturn(store);
        store.persistOutgoing(ss, msg);
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        SOAPMessageContext context = (SOAPMessageContext)sb.createBindingMessageContext(objectCtx);
        sb.read(istreamCtx, context);
        assertTrue(codec.handleMessage(context));
        RMProperties rmps = RMContextUtils.retrieveRMProperties(context, false);
        SequenceType st = rmps.getSequence();
        assertNotNull(st);
        assertEquals(st.getIdentifier().getValue(), SEQ_IDENTIFIER);
        assertEquals(st.getMessageNumber(), MSG1_MESSAGE_NUMBER);
       
        assertNull(rmps.getAcks());
        assertNull(rmps.getAcksRequested());

    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

        assertEquals(1, requested.size());
        AckRequestedType ar = requested.iterator().next();
        assertNotNull(ar);
        assertEquals(ar.getIdentifier().getValue(), SEQ_IDENTIFIER);

        SequenceType s = rmps.getSequence();
        assertNotNull(s);
        assertEquals(s.getIdentifier().getValue(), SEQ_IDENTIFIER);
        assertEquals(s.getMessageNumber(), MSG2_MESSAGE_NUMBER);

        assertNull(rmps.getAcks());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

        return new Resender() {
            public void resend(ObjectMessageContext context,
                               boolean requestAcknowledge) {
                RMProperties properties =
                    RMContextUtils.retrieveRMProperties(context, true);
                SequenceType st = properties.getSequence();
                if (st != null) {
                    LOG.log(Level.INFO, "RESEND_MSG", st.getMessageNumber());
                }
                try {
                    refreshMAPs(context);
                    refreshRMProperties(context, requestAcknowledge);
                    if (ContextUtils.isRequestor(context)) {
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

            } catch (Exception ex) {
                ex.printStackTrace();
            }
        }
       
        SequenceType st = rmps.getSequence();
        Identifier sid = st.getIdentifier();
        synchronized (this) {
            String key = sid.getValue();
            List<ResendCandidate> sequenceCandidates =
                getSequenceCandidates(key);
            if (null == sequenceCandidates) {
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

            if (null != sequenceCandidates) {
                for (int i = sequenceCandidates.size() - 1; i >= 0; i--) {
                    ResendCandidate candidate = sequenceCandidates.get(i);
                    RMProperties properties = RMContextUtils.retrieveRMProperties(candidate.getContext(),
                                                                                  true);
                    SequenceType st = properties.getSequence();
                    BigInteger m = st.getMessageNumber();
                    if (seq.isAcknowledged(m)) {
                        sequenceCandidates.remove(i);
                        candidate.resolved();
                        purged.add(m);
                    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.SequenceType

            }
        }
    }

    private void processSequence(RMProperties rmps, AddressingProperties maps) throws SequenceFault {
        SequenceType s = rmps.getSequence();
        if (null == s) {
            return;
        }  
        getDestination().acknowledge(s,
            null == maps.getReplyTo() ? null : maps.getReplyTo().getAddress().getValue());
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.