Package org.apache.cxf.ws.rmp.v200502

Examples of org.apache.cxf.ws.rmp.v200502.RMAssertion


            store.persistIncoming(this, msg);
        }
       
        RMAssertion rma = RM10PolicyUtils.getRMAssertion(destination.getManager().getRMAssertion(), message);
        long acknowledgementInterval = 0;
        AcknowledgementInterval ai = rma.getAcknowledgementInterval();
        if (null != ai) {
            Long val = ai.getMilliseconds();
            if (null != val) {
                acknowledgementInterval = val.longValue();
            }
        }
       
View Full Code Here


        bval = null;
        if (null != b.getAcknowledgementInterval()) {
            bval = b.getAcknowledgementInterval().getMilliseconds();
        }
        if (null != aval || null != bval) {
            AcknowledgementInterval ai = new RMAssertion.AcknowledgementInterval();
            if (null != aval && null != bval) {
                ai.setMilliseconds(bval);
            } else {
                ai.setMilliseconds(aval != null ? aval : bval);
            }
            compatible.setAcknowledgementInterval(ai);
        }
   
        // backoff parameter
View Full Code Here

        assertEquals(7200000L, c.getInactivityTimeout().getMilliseconds().longValue());
        assertEquals(20000L, c.getBaseRetransmissionInterval().getMilliseconds().longValue());
        assertNull(c.getAcknowledgementInterval());
        assertNull(c.getExponentialBackoff());
      
        AcknowledgementInterval aai = new RMAssertion.AcknowledgementInterval();
        aai.setMilliseconds(new Long(2000));
        a.setAcknowledgementInterval(aai);
       
        c = RM10PolicyUtils.intersect(a, b);
        assertEquals(7200000L, c.getInactivityTimeout().getMilliseconds().longValue());
        assertEquals(20000L, c.getBaseRetransmissionInterval().getMilliseconds().longValue());
View Full Code Here

    public void setRMAssertion(RMAssertion rma) {
        if (null == rma) {
            rma = new RMAssertion();
            rma.setExponentialBackoff(new ExponentialBackoff());
        }
        BaseRetransmissionInterval bri = rma.getBaseRetransmissionInterval();
        if (null == bri) {
            bri = new BaseRetransmissionInterval();
            rma.setBaseRetransmissionInterval(bri);
        }
        if (null == bri.getMilliseconds()) {
            bri.setMilliseconds(Long.valueOf(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
        }

        rmAssertion = rma;
    }
View Full Code Here

        assertEquals(7200000L, c.getInactivityTimeout().getMilliseconds().longValue());
        assertNull(c.getBaseRetransmissionInterval());
        assertNull(c.getAcknowledgementInterval());
        assertNull(c.getExponentialBackoff());
       
        BaseRetransmissionInterval abri = new RMAssertion.BaseRetransmissionInterval();
        abri.setMilliseconds(new Long(10000));
        a.setBaseRetransmissionInterval(abri);
        BaseRetransmissionInterval bbri = new RMAssertion.BaseRetransmissionInterval();
        bbri.setMilliseconds(new Long(20000));
        b.setBaseRetransmissionInterval(bbri);
       
        c = RM10PolicyUtils.intersect(a, b);
        assertEquals(7200000L, c.getInactivityTimeout().getMilliseconds().longValue());
        assertEquals(20000L, c.getBaseRetransmissionInterval().getMilliseconds().longValue());
View Full Code Here

    }
   
    @Test
    public void testGetRMAssertion() {
        RMAssertion a = new RMAssertion();
        BaseRetransmissionInterval abri = new RMAssertion.BaseRetransmissionInterval();
        abri.setMilliseconds(new Long(3000));
        a.setBaseRetransmissionInterval(abri);
        a.setExponentialBackoff(new RMAssertion.ExponentialBackoff());
       
        Message message = control.createMock(Message.class);
        EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(null);
        control.replay();
        assertSame(a, RM10PolicyUtils.getRMAssertion(a, message));
        control.verify();
       
        control.reset();
        AssertionInfoMap aim = control.createMock(AssertionInfoMap.class);
        EasyMock.expect(message.get(AssertionInfoMap.class)).andReturn(aim);
        Collection<AssertionInfo> ais = new ArrayList<AssertionInfo>();
        EasyMock.expect(aim.get(RM10Constants.RMASSERTION_QNAME)).andReturn(ais);
        control.replay();
        assertSame(a, RM10PolicyUtils.getRMAssertion(a, message));
        control.verify();
       
        control.reset();
        RMAssertion b = new RMAssertion();
        BaseRetransmissionInterval bbri = new RMAssertion.BaseRetransmissionInterval();
        bbri.setMilliseconds(new Long(2000));
        b.setBaseRetransmissionInterval(bbri);
        JaxbAssertion<RMAssertion> assertion = new JaxbAssertion<RMAssertion>();
        assertion.setName(RM10Constants.RMASSERTION_QNAME);
        assertion.setData(b);
        AssertionInfo ai = new AssertionInfo(assertion);
View Full Code Here

        dp.setAcksPolicy(ap);
       
        org.apache.cxf.ws.rmp.v200502.ObjectFactory policyFactory =
            new org.apache.cxf.ws.rmp.v200502.ObjectFactory();
        rma = policyFactory.createRMAssertion();
        BaseRetransmissionInterval bri =
            policyFactory.createRMAssertionBaseRetransmissionInterval();
        bri.setMilliseconds(new Long(3000));
        rma.setBaseRetransmissionInterval(bri)

        EasyMock.expect(manager.getRMAssertion()).andReturn(rma).anyTimes();
        EasyMock.expect(manager.getDestinationPolicy()).andReturn(dp).anyTimes();
        EasyMock.expect(manager.getStore()).andReturn(null).anyTimes();
View Full Code Here

    public void setRMAssertion(RMAssertion rma) {
        if (null == rma) {
            rma = new RMAssertion();
            rma.setExponentialBackoff(new ExponentialBackoff());
        }
        BaseRetransmissionInterval bri = rma.getBaseRetransmissionInterval();
        if (null == bri) {
            bri = new BaseRetransmissionInterval();
            rma.setBaseRetransmissionInterval(bri);
        }
        if (null == bri.getMilliseconds()) {
            bri.setMilliseconds(new Long(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
        }

        rmAssertion = rma;
    }
View Full Code Here

    public void setRMAssertion(RMAssertion rma) {
        if (null == rma) {
            rma = new RMAssertion();
            rma.setExponentialBackoff(new ExponentialBackoff());
        }
        BaseRetransmissionInterval bri = rma.getBaseRetransmissionInterval();
        if (null == bri) {
            bri = new BaseRetransmissionInterval();
            rma.setBaseRetransmissionInterval(bri);
        }
        if (null == bri.getMilliseconds()) {
            bri.setMilliseconds(Long.valueOf(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
        }

        rmAssertion = rma;
    }
View Full Code Here

    public void setRMAssertion(RMAssertion rma) {
        if (null == rma) {
            rma = new RMAssertion();
            rma.setExponentialBackoff(new ExponentialBackoff());
        }
        BaseRetransmissionInterval bri = rma.getBaseRetransmissionInterval();
        if (null == bri) {
            bri = new BaseRetransmissionInterval();
            rma.setBaseRetransmissionInterval(bri);
        }
        if (null == bri.getMilliseconds()) {
            bri.setMilliseconds(Long.valueOf(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
        }

        rmAssertion = rma;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.rmp.v200502.RMAssertion

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.