当前位置: 首页>>代码示例>>Java>>正文


Java ServiceHelper.stopAndShutdownServices方法代码示例

本文整理汇总了Java中org.apache.camel.util.ServiceHelper.stopAndShutdownServices方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceHelper.stopAndShutdownServices方法的具体用法?Java ServiceHelper.stopAndShutdownServices怎么用?Java ServiceHelper.stopAndShutdownServices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.camel.util.ServiceHelper的用法示例。


在下文中一共展示了ServiceHelper.stopAndShutdownServices方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    // shutdown aggregation repository and the strategy
    ServiceHelper.stopAndShutdownServices(aggregationRepository, aggregationStrategy);

    // cleanup when shutting down
    inProgressCompleteExchanges.clear();

    if (shutdownExecutorService) {
        camelContext.getExecutorServiceManager().shutdownNow(executorService);
    }
    if (shutdownTimeoutCheckerExecutorService) {
        camelContext.getExecutorServiceManager().shutdownNow(timeoutCheckerExecutorService);
        timeoutCheckerExecutorService = null;
    }

    super.doShutdown();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:AggregateProcessor.java

示例2: shutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
public void shutdown() throws Exception {
    // ensure we are stopped first
    stop();

    if (shuttingdown.compareAndSet(false, true)) {
        try {
            try {
                doShutdown();
            } finally {
                if (childServices != null) {
                    ServiceHelper.stopAndShutdownServices(childServices);
                }
            }
        } finally {
            // shutdown is also stopped so only set shutdown flags
            shutdown.set(true);
            shuttingdown.set(false);
        }
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:21,代码来源:ChildServiceSupport.java

示例3: shutdownServices

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
private void shutdownServices(Object service) {
    // do not rethrow exception as we want to keep shutting down in case of problems

    // allow us to do custom work before delegating to service helper
    try {
        if (service instanceof Service) {
            ServiceHelper.stopAndShutdownService(service);
        } else if (service instanceof Collection) {
            ServiceHelper.stopAndShutdownServices((Collection<?>)service);
        }
    } catch (Throwable e) {
        log.warn("Error occurred while shutting down service: " + service + ". This exception will be ignored.", e);
        // fire event
        EventHelper.notifyServiceStopFailure(this, service, e);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:DefaultCamelContext.java

示例4: doStop

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doStop() throws Exception {
    // when stopping we intend to shutdown
    ServiceHelper.stopAndShutdownService(statistics);
    if (stopServicePool) {
        ServiceHelper.stopAndShutdownService(pool);
    }
    try {
        ServiceHelper.stopAndShutdownServices(producers.values());
    } finally {
        // ensure producers are removed, and also from JMX
        for (Producer producer : producers.values()) {
            getCamelContext().removeService(producer);
        }
    }
    producers.clear();
    if (statistics != null) {
        statistics.clear();
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:ProducerCache.java

示例5: doStop

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doStop() throws Exception {
    // when stopping we intend to shutdown
    ServiceHelper.stopAndShutdownServices(statistics, pool);
    try {
        ServiceHelper.stopAndShutdownServices(consumers.values());
    } finally {
        // ensure consumers are removed, and also from JMX
        for (PollingConsumer consumer : consumers.values()) {
            getCamelContext().removeService(consumer);
        }
    }
    consumers.clear();
    if (statistics != null) {
        statistics.clear();
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:17,代码来源:ConsumerCache.java

示例6: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(producerCache, aggregationStrategy);

    if (shutdownExecutorService && executorService != null) {
        camelContext.getExecutorServiceManager().shutdownNow(executorService);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:RecipientList.java

示例7: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(processors);
    for (Processor processor : processors) {
        removeProcessor(processor);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:LoadBalancerSupport.java

示例8: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(processors, errorHandlers, aggregationStrategy);
    // only clear error handlers when shutting down
    errorHandlers.clear();

    if (shutdownExecutorService && executorService != null) {
        getCamelContext().getExecutorServiceManager().shutdownNow(executorService);
    }
    if (aggregateExecutorService != null) {
        getCamelContext().getExecutorServiceManager().shutdownNow(aggregateExecutorService);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:14,代码来源:MulticastProcessor.java

示例9: doStop

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doStop() throws Exception {
    if (scheduler != null) {
        scheduler.unscheduleTask();
        ServiceHelper.stopAndShutdownServices(scheduler);
    }

    // clear counters
    backoffCounter = 0;
    idleCounter = 0;
    errorCounter = 0;

    super.doStop();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:15,代码来源:ScheduledPollConsumer.java

示例10: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(processor);
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:5,代码来源:ComponentProxyProducer.java

示例11: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(output, errorHandler);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:5,代码来源:DefaultChannel.java

示例12: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
@Override
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(processor, idempotentRepository);
    camelContext.removeService(idempotentRepository);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:6,代码来源:IdempotentConsumer.java

示例13: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(aggregationStrategy, consumerCache);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:PollEnricher.java

示例14: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(producerCache, errorHandlers);

    // only clear error handlers when shutting down
    errorHandlers.clear();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:RoutingSlip.java

示例15: doShutdown

import org.apache.camel.util.ServiceHelper; //导入方法依赖的package包/类
protected void doShutdown() throws Exception {
    ServiceHelper.stopAndShutdownServices(producerCache, producer);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:SendProcessor.java


注:本文中的org.apache.camel.util.ServiceHelper.stopAndShutdownServices方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。