|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModelCamelContext
Model level interface for the CamelContext
Method Summary | |
---|---|
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. |
RouteDefinition |
getRouteDefinition(String id)
Gets the route definition with the given id |
List<RouteDefinition> |
getRouteDefinitions()
Returns a list of the current route definitions |
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) |
Methods inherited from interface org.apache.camel.SuspendableService |
---|
isSuspended, resume, suspend |
Methods inherited from interface org.apache.camel.Service |
---|
start, stop |
Methods inherited from interface org.apache.camel.RuntimeConfiguration |
---|
getDelayer, getShutdownRoute, getShutdownRunningTask, isAutoStartup, isHandleFault, isStreamCaching, isTracing, setAutoStartup, setDelayer, setHandleFault, setShutdownRoute, setShutdownRunningTask, setStreamCaching, setTracing |
Method Detail |
---|
List<RouteDefinition> getRouteDefinitions()
getRouteDefinitions
in interface CamelContext
RouteDefinition getRouteDefinition(String id)
getRouteDefinition
in interface CamelContext
id
- id of the route
RoutesDefinition loadRoutesDefinition(InputStream is) throws Exception
InputStream
.
loadRoutesDefinition
in interface CamelContext
is
- input stream with the route(s) definition to add
Exception
- if the route 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 add
Exception
- 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 add
Exception
- 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 remove
Exception
- if the route definitions could not be removed for whatever reasonvoid removeRouteDefinition(RouteDefinition routeDefinition) throws Exception
removeRouteDefinition
in interface CamelContext
routeDefinition
- route definition to remove
Exception
- if the route definition could not be removed for whatever reason@Deprecated void startRoute(RouteDefinition route) throws Exception
CamelContext.startRoute(String)
startRoute
in interface CamelContext
route
- the route to start
Exception
- 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 stop
Exception
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |