Examples of mediate()


Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor.mediate()

        cm = md.getConflictManager(new ModuleId("theirorg", "theirmodule2"));
        assertNull(cm);

        assertEquals(
            ModuleRevisionId.parse("yourorg#yourmodule1#BRANCH;1.0"),
            md.mediate(
                new DefaultDependencyDescriptor(ModuleRevisionId.parse("yourorg#yourmodule1;2.0"),
                        false)).getDependencyRevisionId());

        ExcludeRule[] rules = md.getAllExcludeRules();
        assertNotNull(rules);
View Full Code Here

Examples of org.apache.ivy.core.module.descriptor.ModuleDescriptor.mediate()

            Collections.reverse(dependers);
            for (Iterator iterator = dependers.iterator(); iterator.hasNext();) {
                VisitNode n = (VisitNode) iterator.next();
                ModuleDescriptor md = n.getDescriptor();
                if (md != null) {
                    dd = md.mediate(dd);
                }
            }
        }

        if (originalDD != dd) {
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        }
        populateParameters(synCtx);
        //get the target function template and invoke by passing populated parameters
        Mediator mediator = synCtx.getSequenceTemplate(targetTemplate);
        if (mediator != null && mediator instanceof TemplateMediator) {
            return mediator.mediate(synCtx);
        }
        return false;
    }

    /**
 
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        MessageContext synCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>", config);
        Mediator seq1 = synCtx.getSequence(KEY_DYNAMIC_SEQUENCE_1);
        assertNotNull(seq1);
        assertTrue(((SequenceMediator) seq1).isInitialized());
        assertEquals(1, registry.getHitCount());
        seq1.mediate(synCtx);
        assertEquals("bar", synCtx.getProperty("foo"));

        // Phase 2
        System.out.println("Testing basic sequence caching...");
        synCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>", config);
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        synCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>", config);
        Mediator seq2 = synCtx.getSequence(KEY_DYNAMIC_SEQUENCE_1);
        assertNotNull(seq2);
        assertTrue(((SequenceMediator) seq2).isInitialized());
        assertEquals(1, registry.getHitCount());
        seq2.mediate(synCtx);
        assertEquals("bar", synCtx.getProperty("foo"));
        assertTrue(seq1 == seq2);

        // Phase 3
        System.out.println("Testing advanced sequence caching...");
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        Thread.sleep(8500L);
        Mediator seq3 = synCtx.getSequence(KEY_DYNAMIC_SEQUENCE_1);
        assertNotNull(seq3);
        assertTrue(((SequenceMediator) seq3).isInitialized());
        assertEquals(1, registry.getHitCount());
        seq3.mediate(synCtx);
        assertEquals("bar", synCtx.getProperty("foo"));
        assertTrue(seq1 == seq3);

        // Phase 4
        System.out.println("Testing sequence reloading...");
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        synCtx = TestUtils.createLightweightSynapseMessageContext("<empty/>", config);
        Mediator seq4 = synCtx.getSequence(KEY_DYNAMIC_SEQUENCE_1);
        assertNotNull(seq4);
        assertTrue(((SequenceMediator) seq4).isInitialized());
        assertEquals(2, registry.getHitCount());
        seq4.mediate(synCtx);
        assertEquals("baz", synCtx.getProperty("foo"));
        assertTrue(seq1 != seq4);
        assertTrue(!((SequenceMediator) seq1).isInitialized());

        // Phase 5
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        }
        if (canAccess) {
            if (onAcceptSeqKey != null) {
                Mediator mediator = synCtx.getSequence(onAcceptSeqKey);
                if (mediator != null) {
                    return mediator.mediate(synCtx);
                } else {
                    handleException("Unable to find onAccept sequence with key : "
                            + onAcceptSeqKey, synCtx);
                }
            } else if (onAcceptMediator != null) {
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

        } else {
            if (onRejectSeqKey != null) {
                Mediator mediator = synCtx.getSequence(onRejectSeqKey);
                if (mediator != null) {
                    return mediator.mediate(synCtx);
                } else {
                    handleException("Unable to find onReject sequence with key : "
                            + onRejectSeqKey, synCtx);
                }
            } else if (onRejectMediator != null) {
View Full Code Here

Examples of org.apache.synapse.Mediator.mediate()

            Parameter inMediationParam
                    = service.getParameter(HandlerConstants.IN_SEQUENCE_PARAM_NAME);
            if (inMediationParam != null && inMediationParam.getValue() != null) {
                if (inMediationParam.getValue() instanceof Mediator) {
                    Mediator inMessageSequence = (Mediator) inMediationParam.getValue();
                    return inMessageSequence.mediate(synCtx);
                } else if (inMediationParam.getValue() instanceof String) {
                    Mediator inMessageSequence = synCtx.getConfiguration().getSequence(
                            (String) inMediationParam.getValue());
                    return inMessageSequence.mediate(synCtx);
                } else {
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.