Package org.apache.camel.management.mbean

Examples of org.apache.camel.management.mbean.ManagedRoute


            if (!shouldRegister(route, route)) {
                // avoid registering if not needed, skip to next route
                continue;
            }

            ManagedRoute mr;
            if (route.supportsSuspension()) {
                mr = new ManagedSuspendableRoute(camelContext, route);
            } else {
                mr = new ManagedRoute(camelContext, route);
            }
            mr.init(getManagementStrategy());

            // skip already managed routes, for example if the route has been restarted
            if (getManagementStrategy().isManaged(mr, null)) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("The route is already managed: " + route);
View Full Code Here


        if (!initialized) {
            return;
        }

        for (Route route : routes) {
            ManagedRoute mr = new ManagedRoute(camelContext, route);
            mr.init(getManagementStrategy());

            // skip unmanaged routes
            if (!getManagementStrategy().isManaged(mr, null)) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("The route is not managed: " + route);
View Full Code Here

        if (!initialized) {
            return;
        }

        for (Route route : routes) {
            ManagedRoute mr = new ManagedRoute(context, route);
            mr.init(getManagementStrategy());

            // skip already managed routes, for example if the route has been restarted
            if (getManagementStrategy().isManaged(mr, null)) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("The route is already managed: " + route);
View Full Code Here

            ManagedEndpoint me = (ManagedEndpoint) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint(me.getEndpoint());
        } else if (managedObject instanceof Endpoint) {
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint((Endpoint) managedObject);
        } else if (managedObject instanceof ManagedRoute) {
            ManagedRoute mr = (ManagedRoute) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForRoute(mr.getRoute());
        } else if (managedObject instanceof ManagedErrorHandler) {
            ManagedErrorHandler meh = (ManagedErrorHandler) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForErrorHandler(meh.getRouteContext(), meh.getErrorHandler(), meh.getErrorHandlerBuilder());
        } else if (managedObject instanceof ManagedProcessor) {
            ManagedProcessor mp = (ManagedProcessor) managedObject;
View Full Code Here

            if (route instanceof EventDrivenConsumerRoute) {
                EventDrivenConsumerRoute edcr = (EventDrivenConsumerRoute) route;
                Processor processor = edcr.getProcessor();
                if (processor instanceof InstrumentationProcessor && mr instanceof ManagedRoute) {
                    InstrumentationProcessor ip = (InstrumentationProcessor) processor;
                    ManagedRoute routeMBean = (ManagedRoute) mr;

                    // we need to wrap the counter with the camel context so we get stats updated on the context as well
                    if (camelContextMBean != null) {
                        CompositePerformanceCounter wrapper = new CompositePerformanceCounter(routeMBean, camelContextMBean);
                        ip.setCounter(wrapper);
View Full Code Here

            ManagedEndpoint me = (ManagedEndpoint) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint(me.getEndpoint());
        } else if (managedObject instanceof Endpoint) {
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint((Endpoint) managedObject);
        } else if (managedObject instanceof ManagedRoute) {
            ManagedRoute mr = (ManagedRoute) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForRoute(mr.getRoute());
        } else if (managedObject instanceof ManagedErrorHandler) {
            ManagedErrorHandler meh = (ManagedErrorHandler) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForErrorHandler(meh.getRouteContext(), meh.getErrorHandler(), meh.getErrorHandlerBuilder());
        } else if (managedObject instanceof ManagedProcessor) {
            ManagedProcessor mp = (ManagedProcessor) managedObject;
View Full Code Here

        me.init(context.getManagementStrategy());
        return me;
    }

    public Object getManagedObjectForRoute(CamelContext context, Route route) {
        ManagedRoute mr;
        if (route.supportsSuspension()) {
            mr = new ManagedSuspendableRoute((ModelCamelContext)context, route);
        } else {
            mr = new ManagedRoute((ModelCamelContext)context, route);
        }
        mr.init(context.getManagementStrategy());
        return mr;
    }
View Full Code Here

            ManagedEndpoint me = (ManagedEndpoint) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint(me.getEndpoint());
        } else if (managedObject instanceof Endpoint) {
            objectName = getManagementNamingStrategy().getObjectNameForEndpoint((Endpoint) managedObject);
        } else if (managedObject instanceof ManagedRoute) {
            ManagedRoute mr = (ManagedRoute) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForRoute(mr.getRoute());
        } else if (managedObject instanceof ManagedErrorHandler) {
            ManagedErrorHandler meh = (ManagedErrorHandler) managedObject;
            objectName = getManagementNamingStrategy().getObjectNameForErrorHandler(meh.getRouteContext(), meh.getErrorHandler(), meh.getErrorHandlerBuilder());
        } else if (managedObject instanceof ManagedProcessor) {
            ManagedProcessor mp = (ManagedProcessor) managedObject;
View Full Code Here

        if (!initialized) {
            return;
        }

        for (Route route : routes) {
            ManagedRoute mr;
            if (route.supportsSuspension()) {
                mr = new ManagedSuspendableRoute(camelContext, route);
            } else {
                mr = new ManagedRoute(camelContext, route);
            }
            mr.init(getManagementStrategy());

            // skip already managed routes, for example if the route has been restarted
            if (getManagementStrategy().isManaged(mr, null)) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("The route is already managed: " + route);
View Full Code Here

        if (!initialized) {
            return;
        }

        for (Route route : routes) {           
            ManagedRoute mr = new ManagedRoute(camelContext, route);
            mr.init(getManagementStrategy());

            // skip unmanaged routes
            if (!getManagementStrategy().isManaged(mr, null)) {
                if (LOG.isTraceEnabled()) {
                    LOG.trace("The route is not managed: " + route);
View Full Code Here

TOP

Related Classes of org.apache.camel.management.mbean.ManagedRoute

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.