Package org.apache.cxf.ws.rm.policy

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


         */
        protected ResendCandidate(Message m) {
            message = m;
            resends = 0;
            out = m.getContent(OutputStream.class);
            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;
           
           
View Full Code Here

         * @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

        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

        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

         * @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

            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

        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(0, sp.getSequenceExpiration().getTimeInMillis(new Date()));
        assertEquals(0, sp.getOfferedSequenceExpiration().getTimeInMillis(new Date()));
        assertNull(sp.getAcksTo());
View Full Code Here

    String getCorrelationID() {
        return correlationID;
    }

    void scheduleAcknowledgement() {         
        RMAssertion rma = destination.getManager().getRMAssertion();
        int delay = 0;
        if (null != rma.getAcknowledgementInterval()) {
            delay = rma.getAcknowledgementInterval().getMilliseconds().intValue();
        }
        AcksPolicyType ap = destination.getManager().getDestinationPolicy().getAcksPolicy();
        if (delay > 0 && getMonitor().getMPM() >= ap.getIntraMessageThreshold()) {
            LOG.fine("Schedule deferred acknowledgment");
View Full Code Here

    @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("3000"));
            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

TOP

Related Classes of org.apache.cxf.ws.rm.policy.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.