Class LifecycleStrategySupport

  • All Implemented Interfaces:
    org.apache.camel.spi.LifecycleStrategy

    public abstract class LifecycleStrategySupport
    extends Object
    implements org.apache.camel.spi.LifecycleStrategy
    A useful base class for LifecycleStrategy implementations.
    • Constructor Detail

      • LifecycleStrategySupport

        public LifecycleStrategySupport()
    • Method Detail

      • onContextStart

        public void onContextStart​(org.apache.camel.CamelContext context)
                            throws org.apache.camel.VetoCamelContextStartException
        Specified by:
        onContextStart in interface org.apache.camel.spi.LifecycleStrategy
        Throws:
        org.apache.camel.VetoCamelContextStartException
      • onContextStop

        public void onContextStop​(org.apache.camel.CamelContext context)
        Specified by:
        onContextStop in interface org.apache.camel.spi.LifecycleStrategy
      • onComponentAdd

        public void onComponentAdd​(String name,
                                   org.apache.camel.Component component)
        Specified by:
        onComponentAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onComponentRemove

        public void onComponentRemove​(String name,
                                      org.apache.camel.Component component)
        Specified by:
        onComponentRemove in interface org.apache.camel.spi.LifecycleStrategy
      • onEndpointAdd

        public void onEndpointAdd​(org.apache.camel.Endpoint endpoint)
        Specified by:
        onEndpointAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onEndpointRemove

        public void onEndpointRemove​(org.apache.camel.Endpoint endpoint)
        Specified by:
        onEndpointRemove in interface org.apache.camel.spi.LifecycleStrategy
      • onServiceAdd

        public void onServiceAdd​(org.apache.camel.CamelContext context,
                                 org.apache.camel.Service service,
                                 org.apache.camel.Route route)
        Specified by:
        onServiceAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onServiceRemove

        public void onServiceRemove​(org.apache.camel.CamelContext context,
                                    org.apache.camel.Service service,
                                    org.apache.camel.Route route)
        Specified by:
        onServiceRemove in interface org.apache.camel.spi.LifecycleStrategy
      • onRoutesAdd

        public void onRoutesAdd​(Collection<org.apache.camel.Route> routes)
        Specified by:
        onRoutesAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onRoutesRemove

        public void onRoutesRemove​(Collection<org.apache.camel.Route> routes)
        Specified by:
        onRoutesRemove in interface org.apache.camel.spi.LifecycleStrategy
      • onRouteContextCreate

        public void onRouteContextCreate​(org.apache.camel.Route route)
        Specified by:
        onRouteContextCreate in interface org.apache.camel.spi.LifecycleStrategy
      • onErrorHandlerAdd

        public void onErrorHandlerAdd​(org.apache.camel.Route route,
                                      org.apache.camel.Processor errorHandler,
                                      org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
        Specified by:
        onErrorHandlerAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onErrorHandlerRemove

        public void onErrorHandlerRemove​(org.apache.camel.Route route,
                                         org.apache.camel.Processor errorHandler,
                                         org.apache.camel.ErrorHandlerFactory errorHandlerBuilder)
        Specified by:
        onErrorHandlerRemove in interface org.apache.camel.spi.LifecycleStrategy
      • onThreadPoolAdd

        public void onThreadPoolAdd​(org.apache.camel.CamelContext camelContext,
                                    ThreadPoolExecutor threadPool,
                                    String id,
                                    String sourceId,
                                    String routeId,
                                    String threadPoolProfileId)
        Specified by:
        onThreadPoolAdd in interface org.apache.camel.spi.LifecycleStrategy
      • onThreadPoolRemove

        public void onThreadPoolRemove​(org.apache.camel.CamelContext camelContext,
                                       ThreadPoolExecutor threadPool)
        Specified by:
        onThreadPoolRemove in interface org.apache.camel.spi.LifecycleStrategy
      • adapt

        public static org.apache.camel.spi.LifecycleStrategy adapt​(org.apache.camel.spi.OnCamelContextEvent handler)
      • adapt

        public static org.apache.camel.spi.LifecycleStrategy adapt​(org.apache.camel.spi.OnCamelContextInitialized handler)
      • adapt

        public static org.apache.camel.spi.LifecycleStrategy adapt​(org.apache.camel.spi.OnCamelContextStart handler)
      • adapt

        public static org.apache.camel.spi.LifecycleStrategy adapt​(org.apache.camel.spi.OnCamelContextStop handler)
      • onCamelContextInitialized

        public static org.apache.camel.spi.OnCamelContextInitialized onCamelContextInitialized​(Consumer<org.apache.camel.CamelContext> consumer)
      • onCamelContextStart

        public static org.apache.camel.spi.OnCamelContextStart onCamelContextStart​(Consumer<org.apache.camel.CamelContext> consumer)
      • onCamelContextStop

        public static org.apache.camel.spi.OnCamelContextStop onCamelContextStop​(Consumer<org.apache.camel.CamelContext> consumer)