Examples of RMAssertion


Examples of org.apache.cxf.ws.rm.policy.RMAssertion

            notifyAll();
        }
       
        purgeAcknowledged(messageNumber);
       
        RMAssertion rma = PolicyUtils.getRMAssertion(destination.getManager().getRMAssertion(), message);
        long acknowledgementInterval = 0;
        AcknowledgementInterval ai = rma.getAcknowledgementInterval();
        if (null != ai) {
            BigInteger val = ai.getMilliseconds();
            if (null != val) {
                acknowledgementInterval = val.longValue();
            }
        }
       
        scheduleAcknowledgement(acknowledgementInterval);
      
        long inactivityTimeout = 0;
        InactivityTimeout iat = rma.getInactivityTimeout();
        if (null != iat) {
            BigInteger val = iat.getMilliseconds();
            if (null != val) {
                inactivityTimeout = val.longValue();
            }
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

        assertNotNull("RMAssertion is not set.", manager.getRMAssertion());
        assertNotNull("sourcePolicy is not set.", manager.getSourcePolicy());
        assertNotNull("destinationPolicy is not set.", manager.getDestinationPolicy());
        assertNotNull("deliveryAssirance is not set.", manager.getDeliveryAssurance());
       
        RMAssertion rma = manager.getRMAssertion();
        assertTrue(rma.isSetExponentialBackoff());
        assertEquals(3000L, rma.getBaseRetransmissionInterval().getMilliseconds().longValue());
        assertTrue(!rma.isSetAcknowledgementInterval());
        assertTrue(!rma.isSetInactivityTimeout());  
       
        SourcePolicyType sp = manager.getSourcePolicy();
        assertEquals(0L, sp.getSequenceExpiration().getTimeInMillis(new Date()));
        assertEquals(0L, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
        assertNull(sp.getAcksTo());
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

        assertNotNull("RMAssertion is not set.", manager.getRMAssertion());
        assertNotNull("sourcePolicy is not set.", manager.getSourcePolicy());
        assertNotNull("destinationPolicy is not set.", manager.getDestinationPolicy());
        assertNotNull("deliveryAssirance is not set.", manager.getDeliveryAssurance());
       
        RMAssertion rma = manager.getRMAssertion();
        assertTrue(rma.isSetExponentialBackoff());
        assertEquals(3000L, rma.getBaseRetransmissionInterval().getMilliseconds().longValue());
        assertTrue(!rma.isSetAcknowledgementInterval());
        assertTrue(!rma.isSetInactivityTimeout());  
       
        SourcePolicyType sp = manager.getSourcePolicy();
        assertEquals(0L, sp.getSequenceExpiration().getTimeInMillis(new Date()));
        assertEquals(0L, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
        assertNull(sp.getAcksTo());
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

            wakeupAll();
        }
       
        purgeAcknowledged(messageNumber);
       
        RMAssertion rma = PolicyUtils.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();
            }
        }
       
        scheduleAcknowledgement(acknowledgementInterval);
      
        long inactivityTimeout = 0;
        InactivityTimeout iat = rma.getInactivityTimeout();
        if (null != iat) {
            Long val = iat.getMilliseconds();
            if (null != val) {
                inactivityTimeout = val.longValue();
            }
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

        assertTrue("RMAssertion is not set.", manager.isSetRMAssertion());
        assertTrue("sourcePolicy is not set.", manager.isSetSourcePolicy());
        assertTrue("destinationPolicy is not set.", manager.isSetDestinationPolicy());
        assertTrue("deliveryAssirance is not set.", manager.isSetDeliveryAssurance());
       
        RMAssertion rma = manager.getRMAssertion();
        assertTrue(rma.isSetExponentialBackoff());
        assertEquals(3000L, rma.getBaseRetransmissionInterval().getMilliseconds().longValue());
        assertTrue(!rma.isSetAcknowledgementInterval());
        assertTrue(!rma.isSetInactivityTimeout());  
       
        SourcePolicyType sp = manager.getSourcePolicy();
        assertEquals(0L, sp.getSequenceExpiration().getTimeInMillis(new Date()));
        assertEquals(0L, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
        assertNull(sp.getAcksTo());
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

         * @param ctx message context for the unacked message
         */
        protected ResendCandidate(Message m) {
            message = m;
            resends = 0;
            RMAssertion rma = PolicyUtils.getRMAssertion(manager.getRMAssertion(), message);
            long baseRetransmissionInterval =
                rma.getBaseRetransmissionInterval().getMilliseconds().longValue();
            backoff = null != rma.getExponentialBackoff()
                ? RetransmissionQueue.DEFAULT_EXPONENTIAL_BACKOFF : 1;
            next = new Date(System.currentTimeMillis() + baseRetransmissionInterval);
            nextInterval = baseRetransmissionInterval * backoff;
            if (null != manager.getTimer()) {
                schedule();
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

        BigInteger val = PolicyUtils.getBaseRetransmissionInterval(message);
        if (null != val) {
            return val.longValue();
        } else {

            RMAssertion rma = manager.getRMAssertion();
            RMAssertion.BaseRetransmissionInterval bri = rma.getBaseRetransmissionInterval();
            if (null != bri) {
                val = bri.getMilliseconds();
            }
        }
        if (null != val) {
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

     */
    public boolean useExponentialBackoff(Message message) {
        if (!PolicyUtils.useExponentialBackoff(message)) {
            return false;
        }
        RMAssertion rma = manager.getRMAssertion();
        if (null == rma.getExponentialBackoff()) {
            return false;
        }
        return true;
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

    @PostConstruct
    void initialise() {
        if (!isSetRMAssertion()) {
            org.apache.cxf.ws.rm.policy.ObjectFactory factory =
                new org.apache.cxf.ws.rm.policy.ObjectFactory();
            RMAssertion rma = factory.createRMAssertion();
            BaseRetransmissionInterval bri = factory.createRMAssertionBaseRetransmissionInterval();
            bri.setMilliseconds(new BigInteger(RetransmissionQueue.DEFAULT_BASE_RETRANSMISSION_INTERVAL));
            rma.setBaseRetransmissionInterval(bri);
            rma.setExponentialBackoff(factory.createRMAssertionExponentialBackoff());
            setRMAssertion(rma);
        }
        org.apache.cxf.ws.rm.manager.ObjectFactory factory = new org.apache.cxf.ws.rm.manager.ObjectFactory();
        if (!isSetDeliveryAssurance()) {
            DeliveryAssuranceType da = factory.createDeliveryAssuranceType();
View Full Code Here

Examples of org.apache.cxf.ws.rm.policy.RMAssertion

    }

    void scheduleAcknowledgement(Message message) { 
        BigInteger interval = PolicyUtils.getAcknowledgmentInterval(message);
        if (null == interval) {
            RMAssertion rma = destination.getManager().getRMAssertion();
            if (null != rma.getAcknowledgementInterval()) {
                interval = rma.getAcknowledgementInterval().getMilliseconds();
            }
        }
       
        long delay = 0;
        if (null != interval) {
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.