Package org.apache.synapse.api

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


                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);
                }
View Full Code Here


            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

            if (m == null) {
                String msg = "Sequence mediator instance named " + ref + " cannot be found.";
                log.error(msg);
                throw new SynapseException(msg);
            } else {
                return m.mediate(synCtx);
            }
        }
    }

    public String getName() {
View Full Code Here

            throw new SynapseException(msg, e);
        }

        setProperties(m, synCtx);

        return m.mediate(synCtx);
    }

    /**
     * Only String properties are supported
     * @param m the mediator
View Full Code Here

        log.debug("Implicit Sequence <" + getType() + "> :: mediate()");

        Iterator it = mediators.iterator();
        while (it.hasNext()) {
            Mediator m = (Mediator) it.next();
            if (!m.mediate(synCtx)) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

            ((EnvironmentAware) mediator).setSynapseEnvironment(se);
            ((EnvironmentAware) mediator).setClassLoader(
                    messageContext.getAxisService().getClassLoader());
        }
        SynapseMessage smc = new Axis2SynapseMessage(messageContext);
        boolean returnValue = mediator.mediate(smc);
        messageContext.setProperty(Constants.MEDIATOR_RESPONSE_PROPERTY,
                new Boolean(returnValue));
    }
}
View Full Code Here

      throw new SynapseException(e);
    }
    if (EnvironmentAware.class.isAssignableFrom(m.getClass())) {
      ((EnvironmentAware) m).setSynapseEnvironment(se);
    }
    return m.mediate(smc);

  }

 
  public void setClazz(Class clazz) {
View Full Code Here

  public boolean process(SynapseEnvironment se, SynapseMessage smc) {
    Mediator m = (Mediator) getContext().getBean(getBeanName());
    if (EnvironmentAware.class.isAssignableFrom(m.getClass())) {
      ((EnvironmentAware) m).setSynapseEnvironment(se);
    }
    return m.mediate(smc);

  }

 
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.