Package org.apache.camel

Examples of org.apache.camel.CamelContext.addService()


    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));

        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
            public void notify(EventObject event) throws Exception {
                events.add(event);
            }
View Full Code Here


    private static String stopOrder;

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));
        return context;
    }
View Full Code Here

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));
        return context;
    }

    public void testStopWithFailure() throws Exception {
View Full Code Here

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));
        return context;
    }

    public void testStopWithFailure() throws Exception {
        stopOrder = "";
View Full Code Here

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));

        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
            public void notify(EventObject event) throws Exception {
                events.add(event);
            }
View Full Code Here

    }

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));

        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
            public void notify(EventObject event) throws Exception {
View Full Code Here

    @Override
    protected CamelContext createCamelContext() throws Exception {
        CamelContext context = super.createCamelContext();
        context.addService(new MyService("A", false));
        context.addService(new MyService("B", true));
        context.addService(new MyService("C", false));

        context.getManagementStrategy().addEventNotifier(new EventNotifierSupport() {
            public void notify(EventObject event) throws Exception {
                events.add(event);
View Full Code Here

            if (clazz != null) {
                IntrospectionSupport.setProperty(context.getTypeConverter(), json, "unmarshalType", clazz);
                IntrospectionSupport.setProperty(context.getTypeConverter(), json, "useList", type.endsWith("[]"));
            }
            setAdditionalConfiguration(context, json);
            context.addService(json);

            Class<?> outClazz = null;
            if (outType != null) {
                String typeName = outType.endsWith("[]") ? outType.substring(0, outType.length() - 2) : outType;
                outClazz = context.getClassResolver().resolveMandatoryClass(typeName);
View Full Code Here

            if (outClazz != null) {
                IntrospectionSupport.setProperty(context.getTypeConverter(), outJson, "unmarshalType", outClazz);
                IntrospectionSupport.setProperty(context.getTypeConverter(), outJson, "useList", outType.endsWith("[]"));
            }
            setAdditionalConfiguration(context, outJson);
            context.addService(outJson);
        }

        // setup xml data format
        name = context.getRestConfiguration().getXmlDataFormat();
        if (name == null) {
View Full Code Here

            }
            if (context.getRestConfiguration().getDataFormatProperties() != null) {
                IntrospectionSupport.setProperties(context.getTypeConverter(), jaxb, context.getRestConfiguration().getDataFormatProperties());
            }
            setAdditionalConfiguration(context, jaxb);
            context.addService(jaxb);

            Class<?> outClazz = null;
            if (outType != null) {
                String typeName = outType.endsWith("[]") ? outType.substring(0, outType.length() - 2) : outType;
                outClazz = context.getClassResolver().resolveMandatoryClass(typeName);
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.