Class AbstractCamelContextFactoryBean<T extends org.apache.camel.model.ModelCamelContext>

  • All Implemented Interfaces:
    org.apache.camel.model.rest.RestContainer, org.apache.camel.model.RouteConfigurationContainer, org.apache.camel.model.RouteContainer, org.apache.camel.model.RouteTemplateContainer, org.apache.camel.model.TemplatedRouteContainer

    public abstract class AbstractCamelContextFactoryBean<T extends org.apache.camel.model.ModelCamelContext>
    extends org.apache.camel.model.IdentifiedType
    implements org.apache.camel.model.RouteTemplateContainer, org.apache.camel.model.RouteConfigurationContainer, org.apache.camel.model.RouteContainer, org.apache.camel.model.rest.RestContainer, org.apache.camel.model.TemplatedRouteContainer
    A factory to create and initialize a CamelContext and install routes either explicitly configured or found by searching the classpath for Java classes which extend RouteBuilder.
    • Constructor Detail

      • AbstractCamelContextFactoryBean

        public AbstractCamelContextFactoryBean()
    • Method Detail

      • getObjectType

        public abstract Class<T> getObjectType()
      • isSingleton

        public boolean isSingleton()
      • getContextClassLoaderOnStart

        public ClassLoader getContextClassLoaderOnStart()
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Throws:
        Exception
      • setupRoutes

        protected void setupRoutes()
                            throws Exception
        Setup all the routes which must be done prior starting CamelContext.
        Throws:
        Exception
      • initCustomRegistry

        protected abstract void initCustomRegistry​(T context)
      • initStreamCachingStrategy

        protected void initStreamCachingStrategy()
                                          throws Exception
        Throws:
        Exception
      • initRouteController

        protected void initRouteController()
                                    throws Exception
        Throws:
        Exception
      • initPropertyPlaceholder

        protected void initPropertyPlaceholder()
                                        throws Exception
        Throws:
        Exception
      • initRouteConfigurationRefs

        protected void initRouteConfigurationRefs()
                                           throws Exception
        Throws:
        Exception
      • initRouteTemplateRefs

        protected void initRouteTemplateRefs()
                                      throws Exception
        Throws:
        Exception
      • getBeanForType

        protected abstract <S> S getBeanForType​(Class<S> clazz)
      • getContext

        public T getContext()
      • getContext

        public abstract T getContext​(boolean create)
      • getRouteTemplates

        public abstract List<org.apache.camel.model.RouteTemplateDefinition> getRouteTemplates()
        Specified by:
        getRouteTemplates in interface org.apache.camel.model.RouteTemplateContainer
      • getTemplatedRoutes

        public abstract List<org.apache.camel.model.TemplatedRouteDefinition> getTemplatedRoutes()
        Specified by:
        getTemplatedRoutes in interface org.apache.camel.model.TemplatedRouteContainer
      • getRouteConfigurations

        public abstract List<org.apache.camel.model.RouteConfigurationDefinition> getRouteConfigurations()
        Specified by:
        getRouteConfigurations in interface org.apache.camel.model.RouteConfigurationContainer
      • getRoutes

        public abstract List<org.apache.camel.model.RouteDefinition> getRoutes()
        Specified by:
        getRoutes in interface org.apache.camel.model.RouteContainer
      • getRests

        public abstract List<org.apache.camel.model.rest.RestDefinition> getRests()
        Specified by:
        getRests in interface org.apache.camel.model.rest.RestContainer
      • getRestConfiguration

        public abstract org.apache.camel.model.rest.RestConfigurationDefinition getRestConfiguration()
      • getIntercepts

        public abstract List<org.apache.camel.model.InterceptDefinition> getIntercepts()
      • getInterceptFroms

        public abstract List<org.apache.camel.model.InterceptFromDefinition> getInterceptFroms()
      • getInterceptSendToEndpoints

        public abstract List<org.apache.camel.model.InterceptSendToEndpointDefinition> getInterceptSendToEndpoints()
      • getGlobalOptions

        public abstract org.apache.camel.model.GlobalOptionsDefinition getGlobalOptions()
      • getPackages

        public abstract String[] getPackages()
      • getPackageScan

        public abstract org.apache.camel.model.PackageScanDefinition getPackageScan()
      • setPackageScan

        public abstract void setPackageScan​(org.apache.camel.model.PackageScanDefinition packageScan)
      • getContextScan

        public abstract org.apache.camel.model.ContextScanDefinition getContextScan()
      • setContextScan

        public abstract void setContextScan​(org.apache.camel.model.ContextScanDefinition contextScan)
      • getStartupSummaryLevel

        public abstract org.apache.camel.StartupSummaryLevel getStartupSummaryLevel()
      • getTrace

        public abstract String getTrace()
      • getTracePattern

        public abstract String getTracePattern()
      • getTraceLoggingFormat

        public abstract String getTraceLoggingFormat()
      • getBacklogTrace

        public abstract String getBacklogTrace()
      • getDebug

        public abstract String getDebug()
      • getMessageHistory

        public abstract String getMessageHistory()
      • getSourceLocationEnabled

        public abstract String getSourceLocationEnabled()
      • getLogMask

        public abstract String getLogMask()
      • getLogExhaustedMessageBody

        public abstract String getLogExhaustedMessageBody()
      • getStreamCache

        public abstract String getStreamCache()
      • getDelayer

        public abstract String getDelayer()
      • getAutoStartup

        public abstract String getAutoStartup()
      • getUseMDCLogging

        public abstract String getUseMDCLogging()
      • getMDCLoggingKeysPattern

        public abstract String getMDCLoggingKeysPattern()
      • getDumpRoutes

        public abstract String getDumpRoutes()
      • getUseDataType

        public abstract String getUseDataType()
      • getUseBreadcrumb

        public abstract String getUseBreadcrumb()
      • getBeanPostProcessorEnabled

        public abstract String getBeanPostProcessorEnabled()
      • getAllowUseOriginalMessage

        public abstract String getAllowUseOriginalMessage()
      • getCaseInsensitiveHeaders

        public abstract String getCaseInsensitiveHeaders()
      • getAutowiredEnabled

        public abstract String getAutowiredEnabled()
      • getRuntimeEndpointRegistryEnabled

        public abstract String getRuntimeEndpointRegistryEnabled()
      • getManagementNamePattern

        public abstract String getManagementNamePattern()
      • getThreadNamePattern

        public abstract String getThreadNamePattern()
      • getLoadTypeConverters

        public abstract String getLoadTypeConverters()
      • getLoadHealthChecks

        public abstract String getLoadHealthChecks()
      • getInflightRepositoryBrowseEnabled

        public abstract String getInflightRepositoryBrowseEnabled()
      • getTypeConverterStatisticsEnabled

        public abstract String getTypeConverterStatisticsEnabled()
      • getTypeConverterExistsLoggingLevel

        public abstract org.apache.camel.LoggingLevel getTypeConverterExistsLoggingLevel()
      • getTypeConverterExists

        public abstract org.apache.camel.TypeConverterExists getTypeConverterExists()
      • getRouteConfigurationRefs

        public abstract List<org.apache.camel.model.RouteConfigurationContextRefDefinition> getRouteConfigurationRefs()
      • getBuilderRefs

        public abstract List<org.apache.camel.model.RouteBuilderDefinition> getBuilderRefs()
      • getRouteRefs

        public abstract List<org.apache.camel.model.RouteContextRefDefinition> getRouteRefs()
      • getRouteTemplateRefs

        public abstract List<org.apache.camel.model.RouteTemplateContextRefDefinition> getRouteTemplateRefs()
      • getRestRefs

        public abstract List<org.apache.camel.model.RestContextRefDefinition> getRestRefs()
      • getErrorHandlerRef

        public abstract String getErrorHandlerRef()
      • getDataFormats

        public abstract org.apache.camel.model.dataformat.DataFormatsDefinition getDataFormats()
      • getTransformers

        public abstract org.apache.camel.model.transformer.TransformersDefinition getTransformers()
      • getValidators

        public abstract org.apache.camel.model.validator.ValidatorsDefinition getValidators()
      • getOnExceptions

        public abstract List<org.apache.camel.model.OnExceptionDefinition> getOnExceptions()
      • getOnCompletions

        public abstract List<org.apache.camel.model.OnCompletionDefinition> getOnCompletions()
      • getShutdownRoute

        public abstract org.apache.camel.ShutdownRoute getShutdownRoute()
      • getShutdownRunningTask

        public abstract org.apache.camel.ShutdownRunningTask getShutdownRunningTask()
      • getThreadPoolProfiles

        public abstract List<org.apache.camel.model.ThreadPoolProfileDefinition> getThreadPoolProfiles()
      • getDependsOn

        public abstract String getDependsOn()
      • getBeans

        public abstract List<?> getBeans()
      • getDefaultServiceCallConfiguration

        public abstract org.apache.camel.model.cloud.ServiceCallConfigurationDefinition getDefaultServiceCallConfiguration()
      • getServiceCallConfigurations

        public abstract List<org.apache.camel.model.cloud.ServiceCallConfigurationDefinition> getServiceCallConfigurations()
      • getDefaultResilience4jConfiguration

        public abstract org.apache.camel.model.Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration()
      • getResilience4jConfigurations

        public abstract List<org.apache.camel.model.Resilience4jConfigurationDefinition> getResilience4jConfigurations()
      • getDefaultFaultToleranceConfiguration

        public abstract org.apache.camel.model.FaultToleranceConfigurationDefinition getDefaultFaultToleranceConfiguration()
      • getFaultToleranceConfigurations

        public abstract List<org.apache.camel.model.FaultToleranceConfigurationDefinition> getFaultToleranceConfigurations()
      • initCamelContext

        protected void initCamelContext​(T context)
                                 throws Exception
        Initializes the context
        Parameters:
        context - the context
        Throws:
        Exception - is thrown if error occurred
      • initThreadPoolProfiles

        protected void initThreadPoolProfiles​(T context)
                                       throws Exception
        Throws:
        Exception
      • initBeanPostProcessor

        protected abstract void initBeanPostProcessor​(T context)
      • installRoutes

        protected void installRoutes()
                              throws Exception
        Strategy to install all available routes into the context
        Throws:
        Exception
      • postProcessBeforeInit

        protected abstract void postProcessBeforeInit​(org.apache.camel.builder.RouteBuilder builder)
      • findRouteBuilders

        protected void findRouteBuilders()
                                  throws Exception
        Strategy method to try find RouteBuilder instances on the classpath
        Throws:
        Exception
      • findRouteBuildersByPackageScan

        protected abstract void findRouteBuildersByPackageScan​(String[] packages,
                                                               org.apache.camel.spi.PackageScanFilter filter,
                                                               List<org.apache.camel.RoutesBuilder> builders)
                                                        throws Exception
        Throws:
        Exception
      • findRouteBuildersByContextScan

        protected abstract void findRouteBuildersByContextScan​(org.apache.camel.spi.PackageScanFilter filter,
                                                               boolean includeNonSingletons,
                                                               List<org.apache.camel.RoutesBuilder> builders)
                                                        throws Exception
        Throws:
        Exception