Examples of RmConfiguration


Examples of com.sun.xml.ws.rx.rm.runtime.RmConfiguration

*/
public final class PacketFilteringTubeFactory implements TubeFactory {

    public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException {
        if (isPacketFilteringEnabled(context.getBinding())) {
        RmConfiguration configuration = RmConfigurationFactory.INSTANCE.createInstance(context);

            return new PacketFilteringTube(configuration, context.getTubelineHead(), context);
        } else {
            return context.getTubelineHead();
        }
View Full Code Here

Examples of com.sun.xml.ws.rx.rm.runtime.RmConfiguration

        }
    }

    public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException {
        if (isPacketFilteringEnabled(context.getEndpoint().getBinding())) {
            RmConfiguration configuration = RmConfigurationFactory.INSTANCE.createInstance(context);

            return new PacketFilteringTube(configuration, context.getTubelineHead(), context);
        } else {
            return context.getTubelineHead();
        }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

                    if (rmUri != null && rmUri.equals(ns)) {
                        if (codec == null) {
                            String wsauri = null;
                            AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false);
                            if (maps == null) {
                                RMConfiguration config = getManager(message).getEffectiveConfiguration(message);
                                wsauri = config.getAddressingNamespace();
                            } else {
                                wsauri = maps.getNamespaceURI();
                            }
                            ProtocolVariation protocol = ProtocolVariation.findVariant(rmUri, wsauri);
                            if (protocol == null) {
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

         * @param ctx message context for the unacked message
         */
        protected ResendCandidate(Message m) {
            message = m;
            retries = 0;
            RMConfiguration cfg = manager.getEffectiveConfiguration(message);
            long baseRetransmissionInterval =
                cfg.getBaseRetransmissionInterval().longValue();
            backoff = cfg.isExponentialBackoff()  ? RetransmissionQueue.DEFAULT_EXPONENTIAL_BACKOFF : 1;
            next = new Date(System.currentTimeMillis() + baseRetransmissionInterval);
            nextInterval = baseRetransmissionInterval * backoff;
            RetryPolicyType rmrp = null != manager.getSourcePolicy()
                ? manager.getSourcePolicy().getRetryPolicy() : null;
            maxRetries = null != rmrp ? rmrp.getMaxRetries() : -1;
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

       
        return message;
    }
   
    private void setupMessagePolicies(Message message) {
        RMConfiguration cfg = new RMConfiguration();
        EasyMock.expect(manager.getEffectiveConfiguration(message)).andReturn(cfg);
        cfg.setBaseRetransmissionInterval(new Long(5000));
        cfg.setExponentialBackoff(true);
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

         */
        protected ResendCandidate(Message m) {
            message = m;
            retries = 0;
            out = m.getContent(OutputStream.class);
            RMConfiguration cfg = manager.getEffectiveConfiguration(message);
            long baseRetransmissionInterval =
                cfg.getBaseRetransmissionInterval().longValue();
            backoff = cfg.isExponentialBackoff()  ? RetransmissionQueue.DEFAULT_EXPONENTIAL_BACKOFF : 1;
            next = new Date(System.currentTimeMillis() + baseRetransmissionInterval);
            nextInterval = baseRetransmissionInterval * backoff;
            RetryPolicyType rmrp = null != manager.getSourcePolicy()
                ? manager.getSourcePolicy().getRetryPolicy() : null;
            maxRetries = null != rmrp ? rmrp.getMaxRetries() : -1;
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

                    if (rmUri != null && rmUri.equals(ns)) {
                        if (codec == null) {
                            String wsauri = null;
                            AddressingProperties maps = ContextUtils.retrieveMAPs(message, false, false, false);
                            if (maps == null) {
                                RMConfiguration config = getManager(message).getEffectiveConfiguration(message);
                                wsauri = config.getAddressingNamespace();
                            } else {
                                wsauri = maps.getNamespaceURI();
                            }
                            ProtocolVariation protocol = ProtocolVariation.findVariant(rmUri, wsauri);
                            if (protocol == null) {
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

     * @param rma the default value (non-<code>null</code>)
     * @param message the message
     * @return the compatible RMAssertion
     */
    public static RMConfiguration getRMConfiguration(RMConfiguration defaultValue, Message message) {
        RMConfiguration compatible = defaultValue;
        Collection<AssertionInfo> ais = collectRMAssertions(message.get(AssertionInfoMap.class));
        for (AssertionInfo ai : ais) {
            if (ai.getAssertion() instanceof JaxbAssertion<?>) {
                RMAssertion rma = (RMAssertion)((JaxbAssertion<?>)ai.getAssertion()).getData();
                compatible = intersect(rma, compatible);
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

    public static RMConfiguration intersect(RMAssertion rma, RMConfiguration cfg) {
        if (isCompatible(rma, cfg)) {
            return cfg;
        }
       
        RMConfiguration compatible = new RMConfiguration(cfg);
       
        // if supplied, policy value overrides default inactivity timeout
        Long aval = cfg.getInactivityTimeout();
        Long bval = null;
        if (null != rma.getInactivityTimeout()) {
            bval = rma.getInactivityTimeout().getMilliseconds();           
        }
        if (null != aval || null != bval) {
            Long use;
            if (bval != null) {
                use = bval;
            } else {
                use = aval;
            }
            compatible.setInactivityTimeout(use);
        }
       
        // if supplied, policy value overrides base retransmission interval
        aval = cfg.getBaseRetransmissionInterval();
        bval = null;
        if (null != rma.getBaseRetransmissionInterval()) {
            bval = rma.getBaseRetransmissionInterval().getMilliseconds();           
        }
        if (null != aval || null != bval) {
            Long use;
            if (bval != null) {
                use = bval;
            } else {
                use = aval;
            }
            compatible.setBaseRetransmissionInterval(use);
        }
       
        // if supplied, policy value overrides acknowledgement interval
        aval = cfg.getAcknowledgementInterval();
        bval = null;
        if (null != rma.getAcknowledgementInterval()) {
            bval = rma.getAcknowledgementInterval().getMilliseconds();
        }
        if (null != aval || null != bval) {
            Long use;
            if (bval != null) {
                use = bval;
            } else {
                use = aval;
            }
            compatible.setAcknowledgementInterval(use);
        }
   
        // backoff parameter
        if (cfg.isExponentialBackoff() || null != rma.getExponentialBackoff()) {
            compatible.setExponentialBackoff(true);
        }
        return compatible;
    }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RMConfiguration

     */
    public static RMConfiguration intersect(PrimitiveAssertion rma, RMConfiguration cfg) {
        if (isCompatible(rma, cfg)) {
            return cfg;
        }
        RMConfiguration compatible = new RMConfiguration(cfg);
        String lname = rma.getName().getLocalPart();
        if (RM11Constants.RMASSERTION_NAME.equals(lname)) {
            compatible.setRMNamespace(RM11Constants.NAMESPACE_URI);
        } else if (RM12AssertionBuilder.SEQUENCESTR_NAME.equals(lname)) {
            compatible.setSequenceSTRRequired(true);
        } else if (RM12AssertionBuilder.SEQUENCETRANSEC_NAME.equals(lname)) {
            compatible.setSequenceTransportSecurityRequired(true);
        } else if (RM12AssertionBuilder.EXACTLYONCE_NAME.equals(lname)) {
            compatible.setDeliveryAssurance(DeliveryAssurance.EXACTLY_ONCE);
        } else if (RM12AssertionBuilder.ATLEASTONCE_NAME.equals(lname)) {
            compatible.setDeliveryAssurance(DeliveryAssurance.AT_LEAST_ONCE);
        } else if (RM12AssertionBuilder.ATMOSTONCE_NAME.equals(lname)) {
            compatible.setDeliveryAssurance(DeliveryAssurance.AT_MOST_ONCE);
        } else if (RM12AssertionBuilder.INORDER_NAME.equals(lname)) {
            compatible.setInOrder(true);
        }
        return compatible;
    }
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.