public interface ModelCamelContext extends CamelContext
CamelContext
Modifier and Type | Method and Description |
---|---|
void |
addRestDefinitions(Collection<RestDefinition> restDefinitions)
Adds a collection of rest definitions to the context
|
void |
addRouteDefinition(RouteDefinition routeDefinition)
Add a route definition to the context
Important: Each route in the same
CamelContext must have an unique route id. |
void |
addRouteDefinitions(Collection<RouteDefinition> routeDefinitions)
Adds a collection of route definitions to the context
Important: Each route in the same
CamelContext must have an unique route id. |
Map<String,DataFormatDefinition> |
getDataFormats()
Gets the data formats that can be referenced in the routes.
|
List<RestDefinition> |
getRestDefinitions()
Returns a list of the current REST definitions
|
RouteDefinition |
getRouteDefinition(String id)
Gets the route definition with the given id
|
List<RouteDefinition> |
getRouteDefinitions()
Returns a list of the current route definitions
|
RestsDefinition |
loadRestsDefinition(InputStream is)
Loads a collection of rest definitions from the given
InputStream . |
RoutesDefinition |
loadRoutesDefinition(InputStream is)
Loads a collection of route definitions from the given
InputStream . |
void |
removeRouteDefinition(RouteDefinition routeDefinition)
Removes a route definition from the context - stopping any previously running
routes if any of them are actively running
|
void |
removeRouteDefinitions(Collection<RouteDefinition> routeDefinitions)
Removes a collection of route definitions from the context - stopping any previously running
routes if any of them are actively running
|
DataFormatDefinition |
resolveDataFormatDefinition(String name)
Resolve a data format definition given its name
|
void |
setDataFormats(Map<String,DataFormatDefinition> dataFormats)
Sets the data formats that can be referenced in the routes.
|
void |
startRoute(RouteDefinition route)
Deprecated.
favor using
CamelContext.startRoute(String) |
void |
stopRoute(RouteDefinition route)
Deprecated.
favor using
CamelContext.stopRoute(String) |
adapt, addComponent, addEndpoint, addInterceptStrategy, addLifecycleStrategy, addRegisterEndpointCallback, addRestConfiguration, addRoutePolicyFactory, addRoutes, addService, addService, addService, addServiceCallConfiguration, addStartupListener, createConsumerTemplate, createConsumerTemplate, createFluentProducerTemplate, createFluentProducerTemplate, createProducerTemplate, createProducerTemplate, createRouteStaticEndpointJson, createRouteStaticEndpointJson, deferStartService, disableJMX, explainComponentJson, explainDataFormatJson, explainEipJson, explainEndpointJson, findComponents, findEips, getApplicationContextClassLoader, getAsyncProcessorAwaitManager, getClassResolver, getComponent, getComponent, getComponent, getComponent, getComponentDocumentation, getComponentNames, getComponentParameterJsonSchema, getDataFormatParameterJsonSchema, getDataFormatResolver, getDebugger, getDefaultBacklogDebugger, getDefaultBacklogTracer, getDefaultFactoryFinder, getDefaultTracer, getEipParameterJsonSchema, getEndpoint, getEndpoint, getEndpointMap, getEndpointRegistry, getEndpoints, getErrorHandlerBuilder, getErrorHandlerExecutorService, getExecutorServiceManager, getExecutorServiceStrategy, getFactoryFinder, getInflightRepository, getInjector, getInterceptStrategies, getLanguageNames, getLanguageParameterJsonSchema, getLifecycleStrategies, getManagedCamelContext, getManagedProcessor, getManagedRoute, getManagementMBeanAssembler, getManagementName, getManagementNameStrategy, getManagementStrategy, getMessageHistoryFactory, getModelJAXBContextFactory, getName, getNameStrategy, getNodeIdFactory, getPackageScanClassResolver, getPollingConsumerServicePool, getProcessor, getProcessor, getProcessorDefinition, getProcessorDefinition, getProcessorFactory, getProducerServicePool, getProperties, getProperty, getPropertyPrefixToken, getPropertySuffixToken, getRegistry, getRegistry, getRestConfiguration, getRestConfiguration, getRestConfigurations, getRestRegistry, getRoute, getRoutePolicyFactories, getRoutes, getRouteStartupOrder, getRouteStatus, getRuntimeEndpointRegistry, getServiceCallConfiguration, getShutdownStrategy, getStatus, getStreamCachingStrategy, getTypeConverter, getTypeConverterRegistry, getUnitOfWorkFactory, getUptime, getUptimeMillis, getUuidGenerator, getVersion, hasComponent, hasEndpoint, hasService, hasService, isLazyLoadTypeConverters, isSetupRoutes, isStartingRoutes, isTypeConverterStatisticsEnabled, isUseBreadcrumb, isUseMDCLogging, isVetoStarted, removeComponent, removeEndpoint, removeEndpoints, removeRoute, removeService, resolveComponentDefaultName, resolveDataFormat, resolveLanguage, resolvePropertyPlaceholders, resumeRoute, setApplicationContextClassLoader, setAsyncProcessorAwaitManager, setClassResolver, setDataFormatResolver, setDebugger, setDefaultBacklogDebugger, setDefaultBacklogTracer, setDefaultTracer, setErrorHandlerBuilder, setExecutorServiceManager, setFactoryFinderResolver, setInflightRepository, setLazyLoadTypeConverters, setManagementNameStrategy, setManagementStrategy, setMessageHistoryFactory, setModelJAXBContextFactory, setNameStrategy, setNodeIdFactory, setPackageScanClassResolver, setPollingConsumerServicePool, setProcessorFactory, setProducerServicePool, setProperties, setRestConfiguration, setRestRegistry, setRuntimeEndpointRegistry, setServiceCallConfiguration, setShutdownStrategy, setStreamCachingStrategy, setTypeConverterStatisticsEnabled, setUnitOfWorkFactory, setupRoutes, setUseBreadcrumb, setUseMDCLogging, setUuidGenerator, shutdownRoute, shutdownRoute, start, startAllRoutes, startRoute, stop, stopRoute, stopRoute, stopRoute, suspendRoute, suspendRoute
isSuspended, resume, suspend
getDelayer, getShutdownRoute, getShutdownRunningTask, isAllowUseOriginalMessage, isAutoStartup, isHandleFault, isLogExhaustedMessageBody, isMessageHistory, isStreamCaching, isTracing, setAllowUseOriginalMessage, setAutoStartup, setDelayer, setHandleFault, setLogExhaustedMessageBody, setMessageHistory, setShutdownRoute, setShutdownRunningTask, setStreamCaching, setTracing
List<RouteDefinition> getRouteDefinitions()
getRouteDefinitions
in interface CamelContext
RouteDefinition getRouteDefinition(String id)
getRouteDefinition
in interface CamelContext
id
- id of the routeRoutesDefinition loadRoutesDefinition(InputStream is) throws Exception
InputStream
.loadRoutesDefinition
in interface CamelContext
is
- input stream with the route(s) definition to addException
- if the route definitions could not be loaded for whatever reasonRestsDefinition loadRestsDefinition(InputStream is) throws Exception
InputStream
.loadRestsDefinition
in interface CamelContext
is
- input stream with the rest(s) definition to addException
- if the rest definitions could not be loaded for whatever reasonvoid addRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception
CamelContext
must have an unique route id.
If you use the API from CamelContext
or ModelCamelContext
to add routes, then any
new routes which has a route id that matches an old route, then the old route is replaced by the new route.addRouteDefinitions
in interface CamelContext
routeDefinitions
- the route(s) definition to addException
- if the route definitions could not be created for whatever reasonvoid addRouteDefinition(RouteDefinition routeDefinition) throws Exception
CamelContext
must have an unique route id.
If you use the API from CamelContext
or ModelCamelContext
to add routes, then any
new routes which has a route id that matches an old route, then the old route is replaced by the new route.addRouteDefinition
in interface CamelContext
routeDefinition
- the route definition to addException
- if the route definition could not be created for whatever reasonvoid removeRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception
removeRouteDefinitions
in interface CamelContext
routeDefinitions
- route(s) definitions to removeException
- if the route definitions could not be removed for whatever reasonvoid removeRouteDefinition(RouteDefinition routeDefinition) throws Exception
removeRouteDefinition
in interface CamelContext
routeDefinition
- route definition to removeException
- if the route definition could not be removed for whatever reasonList<RestDefinition> getRestDefinitions()
getRestDefinitions
in interface CamelContext
void addRestDefinitions(Collection<RestDefinition> restDefinitions) throws Exception
addRestDefinitions
in interface CamelContext
restDefinitions
- the rest(s) definition to addException
- if the rest definitions could not be created for whatever reason@Deprecated void startRoute(RouteDefinition route) throws Exception
CamelContext.startRoute(String)
startRoute
in interface CamelContext
route
- the route to startException
- is thrown if the route could not be started for whatever reason@Deprecated void stopRoute(RouteDefinition route) throws Exception
CamelContext.stopRoute(String)
stopRoute
in interface CamelContext
route
- the route to stopException
- is thrown if the route could not be stopped for whatever reasonvoid setDataFormats(Map<String,DataFormatDefinition> dataFormats)
setDataFormats
in interface CamelContext
dataFormats
- the data formatsMap<String,DataFormatDefinition> getDataFormats()
getDataFormats
in interface CamelContext
DataFormatDefinition resolveDataFormatDefinition(String name)
resolveDataFormatDefinition
in interface CamelContext
name
- the data format definition name or a reference to it in the Registry
Apache Camel