Interface ExtendedCamelContext

    • Method Detail

      • setName

        void setName​(String name)
        Sets the name (id) of the this context.

        This operation is mostly only used by different Camel runtimes such as camel-spring, camel-cdi, camel-spring-boot etc. Important: Setting the name should only be set before CamelContext is started.

        Parameters:
        name - the name
      • setRegistry

        void setRegistry​(Registry registry)
        Sets the registry Camel should use for looking up beans by name or type.

        This operation is mostly only used by different Camel runtimes such as camel-spring, camel-cdi, camel-spring-boot etc. Important: Setting the registry should only be set before CamelContext is started.

        Parameters:
        registry - the registry such as DefaultRegistry or
      • setupRoutes

        void setupRoutes​(boolean done)
        Method to signal to CamelContext that the process to initialize setup routes is in progress.
        Parameters:
        done - false to start the process, call again with true to signal its done.
        See Also:
        isSetupRoutes()
      • isSetupRoutes

        boolean isSetupRoutes()
        Indicates whether current thread is setting up route(s) as part of starting Camel from spring/blueprint.

        This can be useful to know by LifecycleStrategy or the likes, in case they need to react differently.

        As the startup procedure of CamelContext is slightly different when using plain Java versus Spring or Blueprint, then we need to know when Spring/Blueprint is setting up the routes, which can happen after the CamelContext itself is in started state, due the asynchronous event nature of especially Blueprint.

        Returns:
        true if current thread is setting up route(s), or false if not.
      • registerEndpointCallback

        void registerEndpointCallback​(EndpointStrategy strategy)
        Registers a callback to allow you to do custom logic when an Endpoint is about to be registered to the EndpointRegistry.

        When a callback is registered it will be executed on the already registered endpoints allowing you to catch-up

        Parameters:
        strategy - callback to be invoked
      • getPrototypeEndpoint

        Endpoint getPrototypeEndpoint​(String uri)
        Resolves the given name to an Endpoint of the specified type (scope is prototype). If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a new Endpoint is created. The endpoint is NOT registered in the EndpointRegistry as its prototype scoped, and therefore expected to be short lived and discarded after use (you must stop and shutdown the endpoint when no longer in use).
        Parameters:
        uri - the URI of the endpoint
        Returns:
        the endpoint
        See Also:
        CamelContext.getEndpoint(String)
      • getPrototypeEndpoint

        Endpoint getPrototypeEndpoint​(NormalizedEndpointUri uri)
        Resolves the given name to an Endpoint of the specified type (scope is prototype). If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a new Endpoint is created. The endpoint is NOT registered in the EndpointRegistry as its prototype scoped, and therefore expected to be short lived and discarded after use (you must stop and shutdown the endpoint when no longer in use).
        Parameters:
        uri - the URI of the endpoint
        Returns:
        the endpoint
        See Also:
        CamelContext.getEndpoint(String)
      • hasEndpoint

        Endpoint hasEndpoint​(NormalizedEndpointUri uri)
        Is the given endpoint already registered in the EndpointRegistry
        Parameters:
        uri - the URI of the endpoint
        Returns:
        the registered endpoint or null if not registered
      • normalizeUri

        NormalizedEndpointUri normalizeUri​(String uri)
        Normalizes the given uri.
        Parameters:
        uri - the uri
        Returns:
        a normalized uri
      • getRouteStartupOrder

        List<RouteStartupOrder> getRouteStartupOrder()
        Returns the order in which the route inputs was started.

        The order may not be according to the startupOrder defined on the route. For example a route could be started manually later, or new routes added at runtime.

        Returns:
        a list in the order how routes was started
      • getBeanPostProcessor

        CamelBeanPostProcessor getBeanPostProcessor()
        Returns the bean post processor used to do any bean customization.
        Returns:
        the bean post processor.
      • getManagementMBeanAssembler

        ManagementMBeanAssembler getManagementMBeanAssembler()
        Returns the management mbean assembler
        Returns:
        the mbean assembler
      • createMulticast

        AsyncProcessor createMulticast​(Collection<Processor> processors,
                                       ExecutorService executor,
                                       boolean shutdownExecutorService)
        Creates a new multicast processor which sends an exchange to all the processors.
        Parameters:
        processors - the list of processors to send to
        executor - the executor to use
        Returns:
        a multicasting processor
      • getErrorHandlerFactory

        ErrorHandlerFactory getErrorHandlerFactory()
        Gets the default error handler builder which is inherited by the routes
        Returns:
        the builder
      • setErrorHandlerFactory

        void setErrorHandlerFactory​(ErrorHandlerFactory errorHandlerFactory)
        Sets the default error handler builder which is inherited by the routes
        Parameters:
        errorHandlerFactory - the builder
      • setNodeIdFactory

        void setNodeIdFactory​(NodeIdFactory factory)
        Uses a custom node id factory when generating auto assigned ids to the nodes in the route definitions
        Parameters:
        factory - custom factory to use
      • getNodeIdFactory

        NodeIdFactory getNodeIdFactory()
        Gets the node id factory
        Returns:
        the node id factory
      • getDataFormatResolver

        DataFormatResolver getDataFormatResolver()
        Gets the current data format resolver
        Returns:
        the resolver
      • setDataFormatResolver

        void setDataFormatResolver​(DataFormatResolver dataFormatResolver)
        Sets a custom data format resolver
        Parameters:
        dataFormatResolver - the resolver
      • getPackageScanClassResolver

        PackageScanClassResolver getPackageScanClassResolver()
        Returns the package scanning class resolver
        Returns:
        the resolver
      • setPackageScanClassResolver

        void setPackageScanClassResolver​(PackageScanClassResolver resolver)
        Sets the package scanning class resolver to use
        Parameters:
        resolver - the resolver
      • getPackageScanResourceResolver

        PackageScanResourceResolver getPackageScanResourceResolver()
        Returns the package scanning resource resolver
        Returns:
        the resolver
      • setPackageScanResourceResolver

        void setPackageScanResourceResolver​(PackageScanResourceResolver resolver)
        Sets the package scanning resource resolver to use
        Parameters:
        resolver - the resolver
      • getDefaultFactoryFinder

        FactoryFinder getDefaultFactoryFinder()
        Gets the default FactoryFinder which will be used for the loading the factory class from META-INF
        Returns:
        the default factory finder
      • getFactoryFinder

        FactoryFinder getFactoryFinder​(String path)
        Gets the FactoryFinder which will be used for the loading the factory class from META-INF in the given path
        Parameters:
        path - the META-INF path
        Returns:
        the factory finder
      • setFactoryFinderResolver

        void setFactoryFinderResolver​(FactoryFinderResolver resolver)
        Sets the factory finder resolver to use.
        Parameters:
        resolver - the factory finder resolver
      • getFactoryFinderResolver

        FactoryFinderResolver getFactoryFinderResolver()
        Gets the factory finder resolver to use
        Returns:
        the factory finder resolver
      • getProcessorFactory

        ProcessorFactory getProcessorFactory()
        Gets the current ProcessorFactory
        Returns:
        the factory, can be null if no custom factory has been set
      • setProcessorFactory

        void setProcessorFactory​(ProcessorFactory processorFactory)
        Sets a custom ProcessorFactory
        Parameters:
        processorFactory - the custom factory
      • getModelJAXBContextFactory

        ModelJAXBContextFactory getModelJAXBContextFactory()
        Returns the JAXB Context factory used to create Models.
        Returns:
        the JAXB Context factory used to create Models.
      • setModelJAXBContextFactory

        void setModelJAXBContextFactory​(ModelJAXBContextFactory modelJAXBContextFactory)
        Sets a custom JAXB Context factory to be used
        Parameters:
        modelJAXBContextFactory - a JAXB Context factory
      • getErrorHandlerExecutorService

        ScheduledExecutorService getErrorHandlerExecutorService()
        Gets the default shared thread pool for error handlers which leverages this for asynchronous redelivery tasks.
      • addInterceptStrategy

        void addInterceptStrategy​(InterceptStrategy interceptStrategy)
        Adds the given interceptor strategy
        Parameters:
        interceptStrategy - the strategy
      • getInterceptStrategies

        List<InterceptStrategy> getInterceptStrategies()
        Gets the interceptor strategies
        Returns:
        the list of current interceptor strategies
      • setupManagement

        void setupManagement​(Map<String,​Object> options)
        Setup management according to whether JMX is enabled or disabled.
        Parameters:
        options - optional parameters to configure ManagementAgent.
      • isEventNotificationApplicable

        boolean isEventNotificationApplicable()
        Whether event notification is applicable (possible). This API is used internally in Camel as optimization.
      • setEventNotificationApplicable

        void setEventNotificationApplicable​(boolean eventNotificationApplicable)
        Used as internal optimization in Camel to flag whether event notification is applicable or not.
      • getInternalRouteController

        RouteController getInternalRouteController()
        Internal RouteController that are only used internally by Camel to perform basic route operations. Do not use this as end user.
      • addRoute

        void addRoute​(Route route)
        Internal API for adding routes. Do not use this as end user.
      • removeRoute

        void removeRoute​(Route route)
        Internal API for removing routes. Do not use this as end user.