Package org.objectweb.celtix.ws.rm

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


                     cs.getAcksTo().getAddress().getValue());
        assertNull(cs.getExpires());
       
        // default is to include offers
       
        OfferType offer = cs.getOffer();
        assertNotNull(offer);
        assertNull(offer.getExpires());
        assertNotNull(offer.getIdentifier());
       
        control.verify();
    }
View Full Code Here


    }

    private void setupOffer(boolean includeOffer, boolean acceptOffer)
        throws DatatypeConfigurationException {

        OfferType o = null;
        if (includeOffer) {
            o = control.createMock(OfferType.class);
        }
        cs.getOffer();
        expectLastCall().andReturn(o);
       
        if (includeOffer) {
            dp.isAcceptOffers();
            expectLastCall().andReturn(acceptOffer);
        }
       
        EndpointReferenceType acksTo =
            control.createMock(EndpointReferenceType.class);
        if (includeOffer && acceptOffer) {
            maps.getTo();
            expectLastCall().andReturn(to);
            RMHandler handler = control.createMock(RMHandler.class);
            dest.getHandler();
            expectLastCall().andReturn(handler);
            RMSource source = control.createMock(RMSource.class);
            handler.getSource();
            expectLastCall().andReturn(source);
            o.getIdentifier();           
            expectLastCall().andReturn(control.createMock(Identifier.class));
            o.getExpires();
            expectLastCall().andReturn(null);
            cs.getAcksTo();
            expectLastCall().andReturn(acksTo);
            AttributedURI address = control.createMock(AttributedURI.class);
            acksTo.getAddress();
View Full Code Here

            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);
        }
       
        getObjectMessageContext().setMessageObjects(new Object[] {cs});
    }
View Full Code Here

            ex = RMUtils.getWSRMFactory().createExpires();
            ex.setValue(effectiveDuration);
            csr.setExpires(ex);
        }
       
        OfferType offer = cs.getOffer();
        if (null != offer) {
            AcceptType accept = RMUtils.getWSRMFactory().createAcceptType();
            if (dp.isAcceptOffers()) {
                RMSource source = destination.getHandler().getSource();
                LOG.fine("Accepting inbound sequence offer");
                AttributedURI to = VersionTransformer.convert(maps.getTo());
                accept.setAcksTo(RMUtils.createReference(to.getValue()));
                SourceSequence seq = new SourceSequence(offer.getIdentifier(),
                                                                    null,
                                                                    csr.getIdentifier());
                seq.setExpires(offer.getExpires());
                seq.setTarget(VersionTransformer.convert(cs.getAcksTo()));
                source.addSequence(seq);
                source.setCurrent(csr.getIdentifier(), seq);     
                LOG.fine("Making offered sequence the current sequence for responses to "
                         + csr.getIdentifier().getValue());
View Full Code Here

TOP

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

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.