Examples of Mediator


Examples of org.apache.synapse.Mediator

    public static Mediator defineSequence(SynapseConfiguration config, OMElement ele,
                                          Properties properties) {

        String name = ele.getAttributeValue(new QName(XMLConfigConstants.NULL_NAMESPACE, "name"));
        if (name != null) {
            Mediator mediator = MediatorFactoryFinder.getInstance().getMediator(ele, properties);
            config.addSequence(name, mediator);
            // mandatory sequence is treated as a speciall sequence because it will be fetched for
            // each and every message and keeps a direct reference to that from the configuration
            // this also limits the ability of the mandatory sequence to be dynamic
            if (SynapseConstants.MANDATORY_SEQUENCE_KEY.equals(name)) {
View Full Code Here

Examples of org.apache.synapse.Mediator

     * @param elem configuration element of the mediator to be built
     * @param properties any additional information passed as key value pairs for creating mediator
     * @return built mediator using the above element
     */
    public final Mediator createMediator(OMElement elem, Properties properties) {
        Mediator mediator = createSpecificMediator(elem, properties);
        OMElement descElem = elem.getFirstChildWithName(DESCRIPTION_Q);
        if (descElem != null) {
            mediator.setDescription(descElem.getText());
        }
        return mediator;
    }
View Full Code Here

Examples of org.apache.synapse.Mediator

    public Mediator getMainSequence() {
        Object o = localEntries.get(SynapseConstants.MAIN_SEQUENCE_KEY);
        if (o != null && o instanceof Mediator) {
            return (Mediator) o;
        } else {
            Mediator main = getConfiguration().getMainSequence();
            localEntries.put(SynapseConstants.MAIN_SEQUENCE_KEY, main);
            return main;
        }
    }
View Full Code Here

Examples of org.apache.synapse.Mediator

    public Mediator getFaultSequence() {
        Object o = localEntries.get(SynapseConstants.FAULT_SEQUENCE_KEY);
        if (o != null && o instanceof Mediator) {
            return (Mediator) o;
        } else {
            Mediator fault = getConfiguration().getFaultSequence();
            localEntries.put(SynapseConstants.FAULT_SEQUENCE_KEY, fault);
            return fault;
        }
    }
View Full Code Here

Examples of org.apache.synapse.Mediator

    public Mediator getSequence(String key) {
        Object o = localEntries.get(key);
        if (o != null && o instanceof Mediator) {
            return (Mediator) o;
        } else {
            Mediator m = getConfiguration().getSequence(key);
            if (m instanceof SequenceMediator) {
                SequenceMediator seqMediator = (SequenceMediator) m;
                synchronized (m) {
                    if (!seqMediator.isInitialized()) {
                        seqMediator.init(synEnv);
View Full Code Here

Examples of org.apache.synapse.api.Mediator

                ApplicationContext appContext = ((SpringConfigExtension) cfg).getAppContext();
                log.debug("Loading bean : " + beanName + " from Spring configuration named : " + configName);
                Object o = appContext.getBean(beanName);

                if (o != null && Mediator.class.isAssignableFrom(o.getClass())) {
                    Mediator m = (Mediator) o;
                    return m.mediate(synCtx);

                } else {
                    handleException("Could not find the bean named : " + beanName +
                        " from the Spring configuration named : " + configName);
                }
            } else {
                handleException("Could not get a reference to a valid Spring configuration named : " + configName);
            }

        } else if (appContext != null) {

            log.debug("Loading bean : " + beanName + " from inline Spring configuration");
            Object o = appContext.getBean(beanName);

            if (o != null && Mediator.class.isAssignableFrom(o.getClass())) {
                Mediator m = (Mediator) o;
                return m.mediate(synCtx);

            } else {
                handleException("Could not find the bean named : " + beanName +
                    " from the inline Spring configuration");
            }
View Full Code Here

Examples of org.apache.tuscany.sca.databinding.Mediator

        XMLAdapterExtensionPoint xmlAdapterExtensionPoint = registry.getExtensionPoint(XMLAdapterExtensionPoint.class);
        xmlAdapterExtensionPoint.addAdapter(CallableReference.class, CallableReferenceXMLAdapter.class);
        xmlAdapterExtensionPoint.addAdapter(OMElement.class, OMElementXMLAdapter.class);
        FaultExceptionMapper faultExceptionMapper = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(FaultExceptionMapper.class);
       
        Mediator mediator = registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(Mediator.class);

        Input2InputTransformer input2InputTransformer = new Input2InputTransformer();
        input2InputTransformer.setMediator(mediator);
        transformers.addTransformer(input2InputTransformer, true);
View Full Code Here

Examples of org.apache.tuscany.spi.databinding.Mediator

    /**
     * @see junit.framework.TestCase#setUp()
     */
    protected void setUp() throws Exception {
        super.setUp();
        Mediator mediator = new MediatorImpl();
        this.processor = new DataBindingWirePostProcessor(mediator);
    }
View Full Code Here

Examples of org.eclipse.sisu.Mediator

        {
            binder.addError( mediatorType + " has wrong number of type arguments" );
        }
        else
        {
            final Mediator mediator = newInstance( mediatorType );
            if ( null != mediator )
            {
                mediate( watchedKey( args[1], (Class) args[0].getRawType() ), mediator, args[2].getRawType() );
            }
        }
View Full Code Here

Examples of org.jamesii.core.observe.Mediator

    ICoupledModel m = (ICoupledModel) model;

    AbstractState mapState = ((IAtomicModel<?>) m.getModel("Map")).getState();

    mapState.setMediator(new Mediator());

    // System.out.println("Instrumenting the model");

    IObserver<? extends IObservable> obs = null;
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.