Package org.objectweb.celtix.ws.rm

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


       
        assertNotNull(CreateSequenceRequest.createDataBindingCallback());
       
        Object[] params = req.getObjectMessageContext().getMessageObjects();
        assertEquals(1, params.length);
        CreateSequenceType cs = (CreateSequenceType)params[0];
       
        assertEquals(VersionTransformer.convert(getEPR("acksTo")).getAddress().getValue(),
                     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


                                      ContextUtils.WSA_OBJECT_FACTORY.createRelatesToType());
        assertNotNull(req);
       
        Object[] params = req.getObjectMessageContext().getMessageObjects();
        assertEquals(1, params.length);
        CreateSequenceType cs = (CreateSequenceType)params[0];
       
        assertEquals(NON_ANONYMOUS_ACKSTO_ADDRESS,
                     cs.getAcksTo().getAddress().getValue());
        assertEquals(ONE_DAY, cs.getExpires().getValue());
        assertNull(cs.getOffer());
       
        control.verify();
    }
View Full Code Here

   
    private void setMessageParameters(RMSource source, EndpointReferenceType defaultAcksTo) {
        SourcePolicyType sourcePolicies = source.getSourcePolicies();
        assert null != sourcePolicies;
       
        CreateSequenceType cs = RMUtils.getWSRMFactory().createCreateSequenceType();
       
        String address = sourcePolicies.getAcksTo();
        EndpointReferenceType acksTo = null;
        if (null != address) {
            acksTo = RMUtils.createReference(address);
        } else {
            acksTo = defaultAcksTo;
        }
        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);
        }
       
        getObjectMessageContext().setMessageObjects(new Object[] {cs});
    }
View Full Code Here

                                                getProxy().getOfferedIdentifier());

            return;
        } else if (RMUtils.getRMConstants().getCreateSequenceAction().equals(action)) {
            Object[] parameters = (Object[])context.get(ObjectMessageContext.METHOD_PARAMETERS);
            CreateSequenceType cs = (CreateSequenceType)parameters[0];

            final CreateSequenceResponseType csr =
                getServant().createSequence(getDestination(), cs, maps);
           
            Runnable response = new Runnable() {
                public void run() {
                    try {
                        getProxy().createSequenceResponse(maps, csr);
                    } catch (IOException ex) {
                        ex.printStackTrace();
                    } catch (SequenceFault sf) {
                        sf.printStackTrace();
                    }
                }
            };
            getBinding().getBus().getWorkQueueManager().getAutomaticWorkQueue().execute(response);
   
            return;
        } else if (RMUtils.getRMConstants().getTerminateSequenceAction().equals(action)) {
            Object[] parameters = (Object[])context.get(ObjectMessageContext.METHOD_PARAMETERS);
            TerminateSequenceType cs = (TerminateSequenceType)parameters[0];

            getServant().terminateSequence(getDestination(), cs.getIdentifier());
        }
       
        // for application AND out of band messages

        if (null != rmps) {           
View Full Code Here

TOP

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

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.