Package org.objectweb.celtix.ws.rm

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


    }
   
    public void testSetExpires() throws DatatypeConfigurationException {
        SourceSequence seq = new SourceSequence(id);
       
        Expires expires = factory.createExpires();
       
        DatatypeFactory dbf = DatatypeFactory.newInstance();
        Duration d = dbf.newDuration(0);       
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(!seq.isExpired());
       
        d = dbf.newDuration("PT0S");       
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(!seq.isExpired());
       
        d = dbf.newDuration(1000);       
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(!seq.isExpired());
       
        d = dbf.newDuration("-PT1S");       
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(seq.isExpired());  
    }
View Full Code Here


            d = DatatypeFactory.newInstance().newDuration(supportedDuration);
        }
        dp.getSequenceExpiration();
        expectLastCall().andReturn(d);
           
        Expires ex = null;
        if (null != requestedDuration) {
            Duration rd = DatatypeFactory.newInstance().newDuration(requestedDuration);
            ex = RMUtils.getWSRMFactory().createExpires();
            ex.setValue(rd);
        }
        cs.getExpires();
        expectLastCall().andReturn(ex);       
       
        setupOffer(includeOffer, acceptOffer);
View Full Code Here

        }
        cs.setAcksTo(acksTo);

        Duration d = sourcePolicies.getSequenceExpiration();
        if (null != d) {
            Expires expires = RMUtils.getWSRMFactory().createExpires();
            expires.setValue(d)
            cs.setExpires(expires);
        }
       
        if (sourcePolicies.isIncludeOffer()) {
            OfferType offer = RMUtils.getWSRMFactory().createOfferType();
            d = sourcePolicies.getOfferedSequenceExpiration();
            if (null != d) {
                Expires expires = RMUtils.getWSRMFactory().createExpires();
                expires.setValue(d)
                offer.setExpires(expires);
            }
            offer.setIdentifier(source.generateSequenceIdentifier());
            cs.setOffer(offer);
        }
View Full Code Here

        DestinationPolicyType dp = destination.getDestinationPolicies();
        Duration supportedDuration = dp.getSequenceExpiration();
        if (null == supportedDuration) {
            supportedDuration = SourceSequence.PT0S;
        }
        Expires ex = cs.getExpires();
        LOG.info("supported duration: "  + supportedDuration);

        if (null != ex || supportedDuration.isShorterThan(SourceSequence.PT0S)) {
            Duration effectiveDuration = supportedDuration;
            if (null != ex && supportedDuration.isLongerThan(ex.getValue()))  {
                effectiveDuration = supportedDuration;
            }
            ex = RMUtils.getWSRMFactory().createExpires();
            ex.setValue(effectiveDuration);
            csr.setExpires(ex);
        }
       
        OfferType offer = cs.getOffer();
        if (null != offer) {
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.ws.rm.Expires

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.