Examples of Expires


Examples of org.apache.cxf.ws.rm.v200502.Expires

        AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
        dp.setAcksPolicy(ap);
        dp.setSequenceExpiration(DURATION_SHORT);
        manager.setDestinationPolicy(dp);
       
        Expires expires = new Expires();
        expires.setValue(DURATION_DEFAULT);
        Message message = createTestCreateSequenceMessage(expires, null);

        CreateSequenceResponseType csr = (CreateSequenceResponseType)servant.createSequence(message);
       
        Expires expires2 = csr.getExpires();
       
        assertNotNull(expires2);
        assertEquals(DURATION_SHORT, expires2.getValue());
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200502.Expires

        DestinationPolicyType dp = RMMANGER_FACTORY.createDestinationPolicyType();
        AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
        dp.setAcksPolicy(ap);
        manager.setDestinationPolicy(dp);
       
        Expires expires = new Expires();
        expires.setValue(DURATION_SHORT);
   
        Message message = createTestCreateSequenceMessage(expires, null);       

        CreateSequenceResponseType csr = (CreateSequenceResponseType)servant.createSequence(message);
       
        Expires expires2 = csr.getExpires();
       
        assertNotNull(expires2);
        assertEquals(DURATION_SHORT, expires2.getValue());
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200502.Expires

        AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
        dp.setAcksPolicy(ap);
        dp.setSequenceExpiration(DURATION_SHORT);
        manager.setDestinationPolicy(dp);
       
        Expires expires = new Expires();
        expires.setValue(DURATION_VERY_SHORT);
       
        Message message = createTestCreateSequenceMessage(expires, null);       
       
        CreateSequenceResponseType csr = (CreateSequenceResponseType)servant.createSequence(message);
       
        Expires expires2 = csr.getExpires();
       
        assertNotNull(expires2);
        assertEquals(DURATION_VERY_SHORT, expires2.getValue());
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200502.Expires

        AcksPolicyType ap = RMMANGER_FACTORY.createAcksPolicyType();
        dp.setAcksPolicy(ap);
       
        manager.setDestinationPolicy(dp);
       
        Expires expires = new Expires();
        expires.setValue(DatatypeFactory.createDuration("P0Y0M0DT0H0M0.0S"));
        Message message = createTestCreateSequenceMessage(expires, null);

        CreateSequenceResponseType csr = (CreateSequenceResponseType)servant.createSequence(message);
       
        Expires expires2 = csr.getExpires();
       
        assertNotNull(expires2);
        assertEquals(DatatypeFactory.PT0S, expires2.getValue());
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

        }
        create.setAcksTo(acksTo);

        Duration d = sp.getSequenceExpiration();
        if (null != d) {
            Expires expires = new Expires();
            expires.setValue(d)
            create.setExpires(expires);
        }
       
        if (sp.isIncludeOffer()) {
            OfferType offer = new OfferType();
            d = sp.getOfferedSequenceExpiration();
            if (null != d) {
                Expires expires = new Expires();
                expires.setValue(d)
                offer.setExpires(expires);
            }
            offer.setIdentifier(reliableEndpoint.getSource().generateSequenceIdentifier());
            offer.setEndpoint(acksTo);
            create.setOffer(offer);
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

        }
        Duration supportedDuration = dp.getSequenceExpiration();
        if (null == supportedDuration) {
            supportedDuration = DatatypeFactory.PT0S;
        }
        Expires ex = create.getExpires();
       
        if (null != ex) {
            Duration effectiveDuration = ex.getValue();
            // PT0S represents 0 second and the shortest duration but in ws-rm, considered the longest
            if (DatatypeFactory.PT0S.equals(effectiveDuration)
                || (!DatatypeFactory.PT0S.equals(supportedDuration)
                    &&  supportedDuration.isShorterThan(effectiveDuration)))  {
                effectiveDuration = supportedDuration;
            }
            ex = new Expires();
            ex.setValue(effectiveDuration);
            createResponse.setExpires(ex);
        }
       
        OfferType offer = create.getOffer();
        if (null != offer) {
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

   
    @Test
    public void testSetExpires() {
        SourceSequence seq = new SourceSequence(id, ProtocolVariation.RM10WSA200408);
       
        Expires expires = factory.createExpires();
        seq.setExpires(expires);
           
        assertTrue(!seq.isExpired());
       
        Duration d = DatatypeFactory.PT0S;         
        expires.setValue(d);
        seq.setExpires(expires);
        try {
            Thread.sleep(1000);
        } catch (InterruptedException ex) {
            assertTrue(!seq.isExpired());
        }
       
        d = DatatypeFactory.createDuration("PT1S");       
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(!seq.isExpired());
       
        d = DatatypeFactory.createDuration("-PT1S")
        expires.setValue(d);
        seq.setExpires(expires);
        assertTrue(seq.isExpired());  
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

        }
        create.setAcksTo(acksTo);

        Duration d = sp.getSequenceExpiration();
        if (null != d) {
            Expires expires = new Expires();
            expires.setValue(d)
            create.setExpires(expires);
        }
       
        if (sp.isIncludeOffer()) {
            OfferType offer = new OfferType();
            d = sp.getOfferedSequenceExpiration();
            if (null != d) {
                Expires expires = new Expires();
                expires.setValue(d)
                offer.setExpires(expires);
            }
            offer.setIdentifier(reliableEndpoint.getSource().generateSequenceIdentifier());
            create.setOffer(offer);
            setOfferedIdentifier(offer);
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

        }
        create.setAcksTo(acksTo);

        Duration d = sp.getSequenceExpiration();
        if (null != d) {
            Expires expires = new Expires();
            expires.setValue(d)
            create.setExpires(expires);
        }
       
        if (sp.isIncludeOffer()) {
            OfferType offer = new OfferType();
            d = sp.getOfferedSequenceExpiration();
            if (null != d) {
                Expires expires = new Expires();
                expires.setValue(d)
                offer.setExpires(expires);
            }
            offer.setIdentifier(reliableEndpoint.getSource().generateSequenceIdentifier());
            create.setOffer(offer);
            setOfferedIdentifier(offer);
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.Expires

        }
        create.setAcksTo(acksTo);

        Duration d = sp.getSequenceExpiration();
        if (null != d) {
            Expires expires = new Expires();
            expires.setValue(d)
            create.setExpires(expires);
        }
       
        if (sp.isIncludeOffer()) {
            OfferType offer = new OfferType();
            d = sp.getOfferedSequenceExpiration();
            if (null != d) {
                Expires expires = new Expires();
                expires.setValue(d)
                offer.setExpires(expires);
            }
            offer.setIdentifier(reliableEndpoint.getSource().generateSequenceIdentifier());
            create.setOffer(offer);
            setOfferedIdentifier(offer);
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.