You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Luca Burgazzoli (Jira)" <ji...@apache.org> on 2020/07/19 09:46:00 UTC
[jira] [Updated] (CAMEL-15312) camel-core - Parameterized
RouteBuilder - add support for life cycle handlers
[ https://issues.apache.org/jira/browse/CAMEL-15312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luca Burgazzoli updated CAMEL-15312:
------------------------------------
Description:
We should have some option to hook a function when the routes definition is created and/or instantiated something like:
{code:java}
context.addLifecycleStrategy(new LifecycleStrategySupport() {
public void onRouteTemplateDefinitionAdd(RouteTemplateDefinition definition) {
/* do some validation here */
}
});
{code}
{code:java}
context.addRouteFromTemplate("myTemplate")
.routeId("myRouteId")
.parameter("a", "b")
.handler(definition -> /* do some validation here */)
.build()
{code}
That would help to add some validation in context such as camel-k when the route templates have some limitations.
was:
We should have some option to hook a function when the routes definition is created and/or instantiated something like:
{code:java}
context.addLifecycleStrategy(new LifecycleStrategySupport() {
public void onRouteTemplateDefinitionAdd(RouteTemplateDefinition definition) {
/* do some validation here */
}
});
{code}
{code:java}
context.addRouteFromTemplate("myTemplate")
.routeId("myRouteId")
.parameter("a", "b")
.handler(definition -> /* do some validation here */)
.build()
{code}
That would help to add some validation in context such as camel-k when the route template has some limitations.
> camel-core - Parameterized RouteBuilder - add support for life cycle handlers
> -----------------------------------------------------------------------------
>
> Key: CAMEL-15312
> URL: https://issues.apache.org/jira/browse/CAMEL-15312
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Luca Burgazzoli
> Priority: Minor
> Fix For: 3.5.0
>
>
> We should have some option to hook a function when the routes definition is created and/or instantiated something like:
> {code:java}
> context.addLifecycleStrategy(new LifecycleStrategySupport() {
> public void onRouteTemplateDefinitionAdd(RouteTemplateDefinition definition) {
> /* do some validation here */
> }
> });
> {code}
> {code:java}
> context.addRouteFromTemplate("myTemplate")
> .routeId("myRouteId")
> .parameter("a", "b")
> .handler(definition -> /* do some validation here */)
> .build()
> {code}
> That would help to add some validation in context such as camel-k when the route templates have some limitations.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)