|
||||||||||
| 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(RouteType route,
FromType 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 |
createProceedProcessor()
Creates a proceed processor |
|
Processor |
createProcessor(ProcessorType node)
Creates a processor |
|
CamelContext |
getCamelContext()
Gets the camel context |
|
DataFormatType |
getDataFormat(String ref)
Get a DataFormatType by ref name |
|
Endpoint<? extends Exchange> |
getEndpoint()
Gets the endpoint |
|
ErrorHandlerWrappingStrategy |
getErrorHandlerWrappingStrategy()
This method retrieves the ErrorHandlerWrappingStrategy. |
|
FromType |
getFrom()
Gets the from type |
|
List<InterceptStrategy> |
getInterceptStrategies()
This method retrieves the InterceptStrategy instances this route context. |
|
RouteType |
getRoute()
Get the route type |
|
void |
intercept(Intercept interceptor)
Intercepts with the given interceptor |
|
boolean |
isRouteAdded()
Returns the isRouteAdded flag |
|
|
lookup(String name,
Class<T> type)
lookup an object by name and type |
|
Endpoint<? extends Exchange> |
resolveEndpoint(String uri)
Resolves an endpoint from the URI |
|
Endpoint<? extends Exchange> |
resolveEndpoint(String uri,
String ref)
Resolves an endpoint from either a URI or a named reference |
|
void |
setErrorHandlerWrappingStrategy(ErrorHandlerWrappingStrategy strategy)
This method sets the ErrorHandlerWrappingStrategy. |
|
void |
setInterceptStrategies(List<InterceptStrategy> interceptStrategies)
This method sets the InterceptStrategy instances on this route context. |
|
void |
setIsRouteAdded(boolean b)
If this flag is true, ProcessorType.addRoutes(RouteContext, java.util.Collection)
will not add processor to addEventDrivenProcessor to the RouteContext and it
will prevent from adding an EventDrivenRoute. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRouteContext(RouteType route,
FromType from,
Collection<Route> routes)
public DefaultRouteContext(CamelContext camelContext)
| Method Detail |
|---|
public Endpoint<? extends Exchange> getEndpoint()
RouteContext
getEndpoint in interface RouteContextpublic FromType getFrom()
RouteContext
getFrom in interface RouteContextpublic RouteType getRoute()
RouteContext
getRoute in interface RouteContextpublic CamelContext getCamelContext()
RouteContext
getCamelContext in interface RouteContext
public Processor createProcessor(ProcessorType node)
throws Exception
RouteContext
createProcessor in interface RouteContextnode - the node
Exception - can be thrownpublic Endpoint<? extends Exchange> resolveEndpoint(String uri)
RouteContext
resolveEndpoint in interface RouteContexturi - the URI
public Endpoint<? extends Exchange> 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 void commit()
RouteContext
commit in interface RouteContextpublic void addEventDrivenProcessor(Processor processor)
RouteContext
addEventDrivenProcessor in interface RouteContextprocessor - the processorpublic void intercept(Intercept interceptor)
RouteContext
intercept in interface RouteContextinterceptor - the interceptorpublic Processor createProceedProcessor()
RouteContext
createProceedProcessor in interface RouteContextpublic 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 ErrorHandlerWrappingStrategy getErrorHandlerWrappingStrategy()
RouteContext
getErrorHandlerWrappingStrategy in interface RouteContextpublic void setErrorHandlerWrappingStrategy(ErrorHandlerWrappingStrategy strategy)
RouteContext
setErrorHandlerWrappingStrategy in interface RouteContextstrategy - the strategypublic boolean isRouteAdded()
RouteContext
isRouteAdded in interface RouteContextpublic void setIsRouteAdded(boolean b)
RouteContextProcessorType.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 RouteContextb - the flagpublic DataFormatType getDataFormat(String ref)
RouteContext
getDataFormat in interface RouteContextref - the ref name to lookup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||