Package org.apache.synapse.mediators.builtin

Examples of org.apache.synapse.mediators.builtin.DropMediator


     */
    public static void setDefaultMainSequence(SynapseConfiguration config) {
        SequenceMediator main = new SequenceMediator();
        main.setName(SynapseConstants.MAIN_SEQUENCE_KEY);
        main.addChild(new LogMediator());
        main.addChild(new DropMediator());
        config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, main);
        // set the aspect configuration
        AspectConfiguration configuration = new AspectConfiguration(main.getName());
        main.configure(configuration);
    }
View Full Code Here


            mp.setExpression(new SynapseXPath("get-property('ERROR_MESSAGE')"));
        } catch (JaxenException ignore) {}
        log.addProperty(mp);

        fault.addChild(log);
        fault.addChild(new DropMediator());

        // set aspect configuration
        AspectConfiguration configuration = new AspectConfiguration(fault.getName());
        fault.configure(configuration);
View Full Code Here

    private static final QName DROP_Q = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "drop");

    protected Mediator createSpecificMediator(OMElement el, Properties properties) {

        Mediator dropMediator = new DropMediator();
        // after successfully creating the mediator
        // set its common attributes such as tracing etc
        processAuditStatus(dropMediator,el);

        return dropMediator;
View Full Code Here

     */
    public static void setDefaultMainSequence(SynapseConfiguration config) {
        SequenceMediator main = new SequenceMediator();
        main.setName(SynapseConstants.MAIN_SEQUENCE_KEY);
        main.addChild(new LogMediator());
        main.addChild(new DropMediator());
        config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, main);
        // set the aspect configuration
        AspectConfiguration configuration = new AspectConfiguration(main.getName());
        main.configure(configuration);
    }
View Full Code Here

            mp.setExpression(new SynapseXPath("get-property('ERROR_MESSAGE')"));
        } catch (JaxenException ignore) {}
        log.addProperty(mp);

        fault.addChild(log);
        fault.addChild(new DropMediator());

        // set aspect configuration
        AspectConfiguration configuration = new AspectConfiguration(fault.getName());
        fault.configure(configuration);
View Full Code Here

    public static SynapseConfiguration getDefaultConfiguration() {
        // programatically create an empty configuration which just log and drop the messages
        SynapseConfiguration config = SynapseConfigUtils.newConfiguration();
        SequenceMediator mainMediator = new SequenceMediator();
        mainMediator.addChild(new LogMediator());
        mainMediator.addChild(new DropMediator());
        mainMediator.setName(SynapseConstants.MAIN_SEQUENCE_KEY);
        config.addSequence(SynapseConstants.MAIN_SEQUENCE_KEY, mainMediator);
        SequenceMediator faultMediator = new SequenceMediator();
        LogMediator fault = new LogMediator();
        fault.setLogLevel(LogMediator.FULL);
View Full Code Here

        if (!(m instanceof DropMediator)) {
            handleException("Unsupported mediator passed in for serialization : " + m.getType());
        }

        DropMediator mediator = (DropMediator) m;
        OMElement drop = fac.createOMElement("drop", synNS);
        saveTracingState(drop, mediator);

        return drop;
    }
View Full Code Here

            } else if (onComplete.getFirstElement() != null) {
                mediator.setOnCompleteSequence((new SequenceMediatorFactory())
                        .createAnonymousSequence(onComplete, properties));
            } else {
                SequenceMediator sequence = new SequenceMediator();
                sequence.addChild(new DropMediator());
                mediator.setOnCompleteSequence(sequence);
            }
        }
        return mediator;
    }
View Full Code Here

public class DropMediatorFactory implements MediatorFactory {

    private static final QName DROP_Q = new QName(Constants.SYNAPSE_NAMESPACE, "drop");

    public Mediator createMediator(OMElement el) {
        return new DropMediator();
    }
View Full Code Here

        if (!(m instanceof DropMediator)) {
            handleException("Unsupported mediator passed in for serialization : " + m.getType());
        }

        DropMediator mediator = (DropMediator) m;
        OMElement drop = fac.createOMElement("drop", synNS);

        if (parent != null) {
            parent.addChild(drop);
        }
View Full Code Here

TOP

Related Classes of org.apache.synapse.mediators.builtin.DropMediator

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.