|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.DefaultRouteContext
public class DefaultRouteContext
The context used to activate new routing rules
| Constructor Summary | |
|---|---|
DefaultRouteContext(CamelContext camelContext)
Only used for lazy construction from inside ExpressionType |
|
DefaultRouteContext(CamelContext camelContext,
RouteDefinition route,
FromDefinition from,
Collection<Route> routes)
|
|
| Method Summary | ||
|---|---|---|
void |
addEventDrivenProcessor(Processor processor)
Adds an event driven processor |
|
void |
addInterceptStrategy(InterceptStrategy interceptStrategy)
Adds a InterceptStrategy to this route context |
|
void |
commit()
Lets complete the route creation, creating a single event driven route for the current from endpoint with any processors required |
|
Processor |
createProcessor(ProcessorDefinition<?> node)
Creates a processor |
|
int |
getAndIncrement(ProcessorDefinition<?> node)
A private counter that increments, is used to as book keeping when building a route based on the model We need this special book keeping be able to assign the correct ProcessorDefinition to the Channel |
|
CamelContext |
getCamelContext()
Gets the camel context |
|
Long |
getDelayer()
Gets the delay value |
|
Endpoint |
getEndpoint()
Gets the endpoint |
|
FromDefinition |
getFrom()
Gets the from type |
|
List<InterceptStrategy> |
getInterceptStrategies()
This method retrieves the InterceptStrategy instances this route context. |
|
InterceptStrategy |
getManagedInterceptStrategy()
Gets the special managed intercept strategy if any |
|
RouteDefinition |
getRoute()
Get the route type |
|
RoutePolicy |
getRoutePolicy()
Gets the route policy |
|
boolean |
isAutoStartup()
Gets whether it should automatic start when Camel starts. |
|
boolean |
isHandleFault()
Returns whether tracing enabled |
|
boolean |
isRouteAdded()
Returns the isRouteAdded flag |
|
boolean |
isStreamCaching()
Returns whether stream cache is enabled |
|
boolean |
isTracing()
Returns whether tracing enabled |
|
|
lookup(String name,
Class<T> type)
lookup an object by name and type |
|
|
lookupByType(Class<T> type)
lookup objects by type |
|
Endpoint |
resolveEndpoint(String uri)
Resolves an endpoint from the URI |
|
Endpoint |
resolveEndpoint(String uri,
String ref)
Resolves an endpoint from either a URI or a named reference |
|
void |
setAutoStartup(Boolean autoStartup)
Sets whether it should automatic start when Camel starts. |
|
void |
setDelayer(long delay)
Sets a delay value in millis that a message is delayed at every step it takes in the route path, to slow things down to better helps you to see what goes Is disabled by default |
|
void |
setHandleFault(Boolean handleFault)
Sets whether handle fault is enabled or not (default is disabled). |
|
void |
setInterceptStrategies(List<InterceptStrategy> interceptStrategies)
This method sets the InterceptStrategy instances on this route context. |
|
void |
setIsRouteAdded(boolean routeAdded)
If this flag is true, ProcessorDefinition.addRoutes(RouteContext, java.util.Collection)
will not add processor to addEventDrivenProcessor to the RouteContext and it
will prevent from adding an EventDrivenRoute. |
|
void |
setManagedInterceptStrategy(InterceptStrategy interceptStrategy)
Sets a special intercept strategy for management. |
|
void |
setRoutePolicy(RoutePolicy routePolicy)
Sets a custom route policy |
|
void |
setStreamCaching(Boolean cache)
Sets whether stream caching is enabled or not (default is disabled). |
|
void |
setTracing(Boolean tracing)
Sets whether tracing is enabled or not (default is disabled). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRouteContext(CamelContext camelContext,
RouteDefinition route,
FromDefinition from,
Collection<Route> routes)
public DefaultRouteContext(CamelContext camelContext)
| Method Detail |
|---|
public Endpoint getEndpoint()
RouteContext
getEndpoint in interface RouteContextpublic FromDefinition getFrom()
RouteContext
getFrom in interface RouteContextpublic RouteDefinition getRoute()
RouteContext
getRoute in interface RouteContextpublic CamelContext getCamelContext()
RouteContext
getCamelContext in interface RouteContext
public Processor createProcessor(ProcessorDefinition<?> node)
throws Exception
RouteContext
createProcessor in interface RouteContextnode - the node
Exception - can be thrownpublic Endpoint resolveEndpoint(String uri)
RouteContext
resolveEndpoint in interface RouteContexturi - the URI
public Endpoint resolveEndpoint(String uri,
String ref)
RouteContext
resolveEndpoint in interface RouteContexturi - the URI orref - the named reference
public <T> T lookup(String name,
Class<T> type)
RouteContext
lookup in interface RouteContextname - the name to lookuptype - the expected type
public <T> Map<String,T> lookupByType(Class<T> type)
RouteContext
lookupByType in interface RouteContexttype - the expected type
public void commit()
RouteContext
commit in interface RouteContextpublic void addEventDrivenProcessor(Processor processor)
RouteContext
addEventDrivenProcessor in interface RouteContextprocessor - the processorpublic List<InterceptStrategy> getInterceptStrategies()
RouteContext
getInterceptStrategies in interface RouteContextpublic void setInterceptStrategies(List<InterceptStrategy> interceptStrategies)
RouteContext
setInterceptStrategies in interface RouteContextinterceptStrategies - the strategiespublic void addInterceptStrategy(InterceptStrategy interceptStrategy)
RouteContext
addInterceptStrategy in interface RouteContextinterceptStrategy - the strategypublic void setManagedInterceptStrategy(InterceptStrategy interceptStrategy)
RouteContext
setManagedInterceptStrategy in interface RouteContextinterceptStrategy - the managed intercept strategypublic InterceptStrategy getManagedInterceptStrategy()
RouteContext
getManagedInterceptStrategy in interface RouteContextpublic boolean isRouteAdded()
RouteContext
isRouteAdded in interface RouteContextpublic void setIsRouteAdded(boolean routeAdded)
RouteContextProcessorDefinition.addRoutes(RouteContext, java.util.Collection)
will not add processor to addEventDrivenProcessor to the RouteContext and it
will prevent from adding an EventDrivenRoute.
setIsRouteAdded in interface RouteContextrouteAdded - the flagpublic void setTracing(Boolean tracing)
RuntimeConfiguration
setTracing in interface RuntimeConfigurationtracing - whether tracing is enabled or not.public boolean isTracing()
RuntimeConfiguration
isTracing in interface RuntimeConfigurationpublic void setStreamCaching(Boolean cache)
RuntimeConfiguration
setStreamCaching in interface RuntimeConfigurationcache - whether stream caching is enabled or notpublic boolean isStreamCaching()
RuntimeConfiguration
isStreamCaching in interface RuntimeConfigurationpublic void setHandleFault(Boolean handleFault)
RuntimeConfiguration
setHandleFault in interface RuntimeConfigurationhandleFault - whether handle fault is enabled or not.public boolean isHandleFault()
RuntimeConfiguration
isHandleFault in interface RuntimeConfigurationpublic void setDelayer(long delay)
RuntimeConfiguration
setDelayer in interface RuntimeConfigurationdelay - delay in millispublic Long getDelayer()
RuntimeConfiguration
getDelayer in interface RuntimeConfigurationpublic void setAutoStartup(Boolean autoStartup)
RuntimeConfigurationCamelContext itself are always started}
setAutoStartup in interface RuntimeConfigurationautoStartup - whether to auto startup.public boolean isAutoStartup()
RuntimeConfiguration
isAutoStartup in interface RuntimeConfigurationpublic RoutePolicy getRoutePolicy()
RouteContext
getRoutePolicy in interface RouteContextpublic void setRoutePolicy(RoutePolicy routePolicy)
RouteContext
setRoutePolicy in interface RouteContextroutePolicy - the custom route policypublic int getAndIncrement(ProcessorDefinition<?> node)
RouteContextProcessorDefinition to the Channel
getAndIncrement in interface RouteContextnode - the current node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||