Package org.objectweb.celtix.context

Examples of org.objectweb.celtix.context.ObjectMessageContext


public class TerminateSequenceRequestTest extends TestCase {
   
    public void testConstruction() {    
       
        ObjectMessageContext objectCtx = new ObjectMessageContextImpl();
        RMSource source = EasyMock.createMock(RMSource.class);
        AbstractBindingBase binding = EasyMock.createMock(AbstractBindingBase.class);
        Transport transport = EasyMock.createMock(Transport.class);
        HandlerChainInvoker hci = new HandlerChainInvoker(new ArrayList<Handler>());
       
View Full Code Here


        assertSame(seq, s.getCurrent(inSid));
        assertNull(s.getCurrent(sid));
    }
   
    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();
View Full Code Here

                     2,
                     queue.getExponentialBackoff());
    }
   
    public void testCacheUnacknowledged() {
        ObjectMessageContext context1 = setUpContext("sequence1");
        ObjectMessageContext context2 = setUpContext("sequence2");
        ObjectMessageContext context3 = setUpContext("sequence1");
       
        setupContextMAPs(context1);
        setupContextMAPs(context2);
        setupContextMAPs(context3);
       
View Full Code Here

                                          messageNumbers,
                                          new boolean[] {true, false});
        List<RetransmissionQueue.ResendCandidate> sequenceList =
            new ArrayList<RetransmissionQueue.ResendCandidate>();
        queue.getUnacknowledged().put("sequence1", sequenceList);
        ObjectMessageContext context1 =
            setUpContext("sequence1", messageNumbers[0]);
        sequenceList.add(queue.createResendCandidate(context1));
        ObjectMessageContext context2 =
            setUpContext("sequence1", messageNumbers[1]);
        sequenceList.add(queue.createResendCandidate(context2));
        ready();

        queue.purgeAcknowledged(sequence);
View Full Code Here

                                           messageNumbers,
                                           new boolean[] {false, false});
        List<RetransmissionQueue.ResendCandidate> sequenceList =
            new ArrayList<RetransmissionQueue.ResendCandidate>();
        queue.getUnacknowledged().put("sequence1", sequenceList);
        ObjectMessageContext context1 =
            setUpContext("sequence1", messageNumbers[0]);
        sequenceList.add(queue.createResendCandidate(context1));
        ObjectMessageContext context2 =
            setUpContext("sequence1", messageNumbers[1]);
        sequenceList.add(queue.createResendCandidate(context2));
        ready();

        queue.purgeAcknowledged(sequence);
View Full Code Here

                                          messageNumbers,
                                          null);
        List<RetransmissionQueue.ResendCandidate> sequenceList =
            new ArrayList<RetransmissionQueue.ResendCandidate>();
        queue.getUnacknowledged().put("sequence1", sequenceList);
        ObjectMessageContext context1 =
            setUpContext("sequence1", messageNumbers[0], false);
        sequenceList.add(queue.createResendCandidate(context1));
        ObjectMessageContext context2 =
            setUpContext("sequence1", messageNumbers[1], false);
        sequenceList.add(queue.createResendCandidate(context2));
        ready();

        assertEquals("unexpected unacked count",
View Full Code Here

                     0,
                     queue.countUnacknowledged(sequence));
    }
   
    public void testResendInitiatorBackoffLogic() {
        ObjectMessageContext context1 = setUpContext("sequence1");
        ObjectMessageContext context2 = setUpContext("sequence2");
        ObjectMessageContext context3 = setUpContext("sequence1");
        setupContextMAPs(context1);
        setupContextMAPs(context2);
        setupContextMAPs(context3);
        ready();
        RetransmissionQueue.ResendCandidate candidate1 =
View Full Code Here

        runCandidates(allCandidates, expectAckRequested);
    }


    public void testResendInitiatorDueLogic() {
        ObjectMessageContext context1 = setUpContext("sequence1");
        ObjectMessageContext context2 = setUpContext("sequence2");
        ObjectMessageContext context3 = setUpContext("sequence1");
        setupContextMAPs(context1);
        setupContextMAPs(context2);
        setupContextMAPs(context3);
        ready();
        RetransmissionQueue.ResendCandidate candidate1 =
View Full Code Here

        runInitiator(new RetransmissionQueue.ResendCandidate[] {candidate1,
                                                                candidate2});
    }
   
    public void testResendInitiatorResolvedLogic() {
        ObjectMessageContext context1 = setUpContext("sequence1");
        ObjectMessageContext context2 = setUpContext("sequence2");
        ObjectMessageContext context3 = setUpContext("sequence1");
        setupContextMAPs(context1);
        setupContextMAPs(context2);
        setupContextMAPs(context3);
        ready();
        RetransmissionQueue.ResendCandidate candidate1 =
View Full Code Here

    public void testDefaultResenderServer() throws Exception {
        doTestDefaultResender(false);
    }

    private void doTestDefaultResender(boolean isRequestor) throws Exception {
        ObjectMessageContext context1 = setUpContext("sequence1");
        setupContextMAPs(context1);
        queue.replaceResender(queue.getDefaultResender());
        ready();
        RetransmissionQueue.ResendCandidate candidate1 =
            queue.cacheUnacknowledged(context1);
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.context.ObjectMessageContext

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.