|
||||||||||
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(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 |
|
CamelContext |
getCamelContext()
Gets the camel context |
|
DataFormatDefinition |
getDataFormat(String ref)
Get a DataFormatType by ref name |
|
Endpoint |
getEndpoint()
Gets the endpoint |
|
FromDefinition |
getFrom()
Gets the from type |
|
List<InterceptStrategy> |
getInterceptStrategies()
This method retrieves the InterceptStrategy instances this route context. |
|
RouteDefinition |
getRoute()
Get the route type |
|
boolean |
isRouteAdded()
Returns the isRouteAdded flag |
|
|
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 |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRouteContext(RouteDefinition route, FromDefinition from, Collection<Route> routes)
public DefaultRouteContext(CamelContext camelContext)
Method Detail |
---|
public Endpoint getEndpoint()
RouteContext
getEndpoint
in interface RouteContext
public FromDefinition getFrom()
RouteContext
getFrom
in interface RouteContext
public RouteDefinition getRoute()
RouteContext
getRoute
in interface RouteContext
public CamelContext getCamelContext()
RouteContext
getCamelContext
in interface RouteContext
public Processor createProcessor(ProcessorDefinition node) throws Exception
RouteContext
createProcessor
in interface RouteContext
node
- the node
Exception
- can be thrownpublic Endpoint resolveEndpoint(String uri)
RouteContext
resolveEndpoint
in interface RouteContext
uri
- the URI
public Endpoint resolveEndpoint(String uri, String ref)
RouteContext
resolveEndpoint
in interface RouteContext
uri
- the URI orref
- the named reference
public <T> T lookup(String name, Class<T> type)
RouteContext
lookup
in interface RouteContext
name
- the name to lookuptype
- the expected type
public <T> Map<String,T> lookupByType(Class<T> type)
RouteContext
lookupByType
in interface RouteContext
type
- the expected type
public void commit()
RouteContext
commit
in interface RouteContext
public void addEventDrivenProcessor(Processor processor)
RouteContext
addEventDrivenProcessor
in interface RouteContext
processor
- the processorpublic List<InterceptStrategy> getInterceptStrategies()
RouteContext
getInterceptStrategies
in interface RouteContext
public void setInterceptStrategies(List<InterceptStrategy> interceptStrategies)
RouteContext
setInterceptStrategies
in interface RouteContext
interceptStrategies
- the strategiespublic void addInterceptStrategy(InterceptStrategy interceptStrategy)
RouteContext
addInterceptStrategy
in interface RouteContext
interceptStrategy
- the strategypublic boolean isRouteAdded()
RouteContext
isRouteAdded
in interface RouteContext
public void setIsRouteAdded(boolean routeAdded)
RouteContext
ProcessorDefinition.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 RouteContext
routeAdded
- the flagpublic DataFormatDefinition getDataFormat(String ref)
RouteContext
getDataFormat
in interface RouteContext
ref
- the ref name to lookup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |