001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.camel.support;
018
019import java.util.Collection;
020import java.util.concurrent.ThreadPoolExecutor;
021
022import org.apache.camel.CamelContext;
023import org.apache.camel.Component;
024import org.apache.camel.Endpoint;
025import org.apache.camel.ErrorHandlerFactory;
026import org.apache.camel.Processor;
027import org.apache.camel.Route;
028import org.apache.camel.Service;
029import org.apache.camel.VetoCamelContextStartException;
030import org.apache.camel.spi.LifecycleStrategy;
031import org.apache.camel.spi.RouteContext;
032
033/**
034 * A useful base class for {@link LifecycleStrategy} implementations.
035 */
036public abstract class LifecycleStrategySupport implements LifecycleStrategy {
037
038    @Override
039    public void onContextStart(CamelContext context) throws VetoCamelContextStartException {
040        // noop
041    }
042
043    @Override
044    public void onContextStop(CamelContext context) {
045        // noop
046    }
047
048    @Override
049    public void onComponentAdd(String name, Component component) {
050        // noop
051    }
052
053    @Override
054    public void onComponentRemove(String name, Component component) {
055        // noop
056    }
057
058    @Override
059    public void onEndpointAdd(Endpoint endpoint) {
060        // noop
061    }
062
063    @Override
064    public void onEndpointRemove(Endpoint endpoint) {
065        // noop
066    }
067
068    @Override
069    public void onServiceAdd(CamelContext context, Service service, Route route) {
070        // noop
071    }
072
073    @Override
074    public void onServiceRemove(CamelContext context, Service service, Route route) {
075        // noop
076    }
077
078    @Override
079    public void onRoutesAdd(Collection<Route> routes) {
080        // noop
081    }
082
083    @Override
084    public void onRoutesRemove(Collection<Route> routes) {
085        // noop
086    }
087
088    @Override
089    public void onRouteContextCreate(RouteContext routeContext) {
090        // noop
091    }
092
093    @Override
094    public void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder) {
095        // noop
096    }
097
098    @Override
099    public void onErrorHandlerRemove(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder) {
100        // noop
101    }
102
103    @Override
104    public void onThreadPoolAdd(CamelContext camelContext, ThreadPoolExecutor threadPool, String id,
105                                String sourceId, String routeId, String threadPoolProfileId) {
106        // noop
107    }
108
109    @Override
110    public void onThreadPoolRemove(CamelContext camelContext, ThreadPoolExecutor threadPool) {
111        // noop
112    }
113}