Package org.apache.camel.spi

Examples of org.apache.camel.spi.ManagementStrategy


            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyCamelContextStarted(CamelContext context) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreCamelContextEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createCamelContextStartedEvent(context);
            if (event == null) {
View Full Code Here


            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyCamelContextStartupFailed(CamelContext context, Throwable cause) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreCamelContextEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createCamelContextStartupFailureEvent(context, cause);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyCamelContextStopping(CamelContext context) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreCamelContextEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createCamelContextStoppingEvent(context);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyCamelContextStopped(CamelContext context) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreCamelContextEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createCamelContextStoppedEvent(context);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyCamelContextStopFailed(CamelContext context, Throwable cause) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreCamelContextEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createCamelContextStopFailureEvent(context, cause);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyServiceStopFailure(CamelContext context, Object service, Throwable cause) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreServiceEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createServiceStopFailureEvent(context, service, cause);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyServiceStartupFailure(CamelContext context, Object service, Throwable cause) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreServiceEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createServiceStartupFailureEvent(context, service, cause);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyRouteStarted(CamelContext context, Route route) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreRouteEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createRouteStartedEvent(route);
            if (event == null) {
View Full Code Here

            doNotifyEvent(notifier, event);
        }
    }

    public static void notifyRouteStopped(CamelContext context, Route route) {
        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreRouteEvents()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createRouteStoppedEvent(route);
            if (event == null) {
View Full Code Here

        if (exchange.getProperty(Exchange.NOTIFY_EVENT, false, Boolean.class)) {
            // do not generate events for an notify event
            return;
        }

        ManagementStrategy management = context.getManagementStrategy();
        if (management == null) {
            return;
        }

        List<EventNotifier> notifiers = management.getEventNotifiers();
        if (notifiers == null || notifiers.isEmpty()) {
            return;
        }

        for (EventNotifier notifier : notifiers) {
            if (notifier.isIgnoreExchangeEvents() || notifier.isIgnoreExchangeCreatedEvent()) {
                continue;
            }

            EventFactory factory = management.getEventFactory();
            if (factory == null) {
                return;
            }
            EventObject event = factory.createExchangeCreatedEvent(exchange);
            if (event == null) {
View Full Code Here

TOP

Related Classes of org.apache.camel.spi.ManagementStrategy

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.