Package org.mule.config.builders

Examples of org.mule.config.builders.QuickConfigurationBuilder


        super(config);
        init();
    }

    protected void init() throws UMOException {
        QuickConfigurationBuilder builder = new QuickConfigurationBuilder(true);
        builder.setModel(config.getModel());
        ThreadingProfile tp = new ThreadingProfile(config.getConnectorThreads(), config.getConnectorThreads(), -1, (byte) 2, null, null);
        MuleManager.getConfiguration().setMessageReceiverThreadingProfile(tp);
        MuleManager.getConfiguration().setMessageDispatcherThreadingProfile(tp);

        UMOManager manager = builder.createStartedManager(config.isSynchronous(), "");
        manager.stop();

        if (config.getEndpointsArray().length > 1) {

            int j = 1;
            String in;
            String out;
            String[] endpoints = config.getEndpointsArray();
            for (int i = 0; i < endpoints.length - 1; i++) {
                in = endpoints[i];
                if ((i + 1) <= endpoints.length) {
                    out = endpoints[i + 1];
                } else {
                    break;
                }
                MuleDescriptor d = createDescriptor("benchmark" + j, in, out);
                builder.registerComponent(d);
                j++;
            }
        }
    }
View Full Code Here


        super(config);
    }

    public void register() throws UMOException
    {
        QuickConfigurationBuilder builder = new QuickConfigurationBuilder();

        builder.setModel(config.getModel());
        String endpoint = config.getEndpointsArray()[config.getEndpointsArray().length-1];
        EventCallback callback = new EventCallback()
        {
            public void eventReceived(UMOEventContext context, Object Component) throws Exception
            {
                String msg = context.getTransformedMessageAsString();
                if(counter > 0 & (counter % 1000 == 0)) System.out.println("Received " + counter + " on: " + context.getEndpointURI().toString());
                count(1);
            }
        };

        Map properties  = new HashMap();
        properties.put("eventCallback", callback);

        builder.registerComponent(FunctionalTestComponent.class.getName(), "Benchmark Receiver", new MuleEndpointURI(endpoint), properties);
    }
View Full Code Here

TOP

Related Classes of org.mule.config.builders.QuickConfigurationBuilder

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.