本文整理汇总了Java中org.apache.camel.spi.ManagementStrategy.getEventNotifiers方法的典型用法代码示例。如果您正苦于以下问题:Java ManagementStrategy.getEventNotifiers方法的具体用法?Java ManagementStrategy.getEventNotifiers怎么用?Java ManagementStrategy.getEventNotifiers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.camel.spi.ManagementStrategy
的用法示例。
在下文中一共展示了ManagementStrategy.getEventNotifiers方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyCamelContextStarting
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyCamelContextStarting(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.createCamelContextStartingEvent(context);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例2: notifyCamelContextSuspended
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyCamelContextSuspended(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.createCamelContextSuspendedEvent(context);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例3: notifyCamelContextStartupFailed
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例4: notifyCamelContextStopping
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例5: notifyCamelContextStopped
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例6: notifyCamelContextStopFailed
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例7: notifyServiceStopFailure
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例8: notifyCamelContextResuming
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyCamelContextResuming(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.createCamelContextResumingEvent(context);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例9: notifyRouteStarted
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例10: notifyRouteStopped
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例11: notifyRouteAdded
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyRouteAdded(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.createRouteAddedEvent(route);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例12: notifyRouteRemoved
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyRouteRemoved(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.createRouteRemovedEvent(route);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例13: notifyExchangeCreated
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyExchangeCreated(CamelContext context, Exchange exchange) {
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) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例14: notifyCamelContextSuspending
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyCamelContextSuspending(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.createCamelContextSuspendingEvent(context);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}
示例15: notifyExchangeFailed
import org.apache.camel.spi.ManagementStrategy; //导入方法依赖的package包/类
public static void notifyExchangeFailed(CamelContext context, Exchange exchange) {
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.isIgnoreExchangeFailedEvents()) {
continue;
}
EventFactory factory = management.getEventFactory();
if (factory == null) {
return;
}
EventObject event = factory.createExchangeFailedEvent(exchange);
if (event == null) {
return;
}
doNotifyEvent(notifier, event);
}
}