You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/01/21 18:06:36 UTC
[GitHub] [camel-k-runtime] lburgazzoli opened a new issue #227: add support
for routes loaders interceptors
lburgazzoli opened a new issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227
I want to introduce some new parameters to the source definition to define the interceptors that have to be executed while loading a route with methods like:
```java
interface RouteLoaderInterceptor {
/**
* Invoked before the source is materialized top a RoutesBuilder.
*/
void beforeLoad(Loader, Source);
/**
* Invoked after the source is materialized to a RoutesBuilder and before
* the builder is added to the runtime.
*/
void afterLoad(Loader, Source, RoutesBuilder);
}
```
the goal is to be have APIs to implement functionalities such as those provided by the knative-source loader and the cron customizer.
On camel-k side, the source should amended like:
```go
type SourceLoaderInterceptorSpec struct {
// A reference to an existing interceptor loaded through the Java's
// service loader mechanic
Ref string `json:"ref,omitempty"`
// A full qualified java class name
Type string `json:"type,omitempty"`
}
type SourceSpec struct {
DataSpec
Language Language `json:"language,omitempty"`
// Loader is an optional id of the org.apache.camel.k.RoutesLoader that will
// interpret this source at runtime
Loader string `json:"loader,omitempty"`
// List of interceptors required by this source
Interceptors []SourceLoaderInterceptorSpec `json:"interceptors,omitempty"`
}
```
**NOTE**: the knative-loader and cron customizer won't be removed but marked as deprecated.
@nicolaferraro tough ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli edited a comment on issue #227: add
support for routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
requires camel 3.1.x as it will provides:
- `RouteBuilder` life-cycle callbacks
- additional hook to intercept `camel-main` life-cycle events
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli commented on issue #227: add support
for routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
requires camel 3.1.x
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] nicolaferraro commented on issue #227: add
support for routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-577750836
Sounds good!
The knative loader is actually not a loader but an interceptor in practice
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli commented on issue #227: add support
for routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579713904
update the `SourceSpec` definition as seems better to use IDs to identify interceptors instead of giving the options to also use the class name
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli closed issue #227: add support for
routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
lburgazzoli closed issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [camel-k-runtime] lburgazzoli edited a comment on issue #227: add
support for routes loaders interceptors
Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #227: add support for routes loaders interceptors
URL: https://github.com/apache/camel-k-runtime/issues/227#issuecomment-579714019
requires camel 3.1.x as it will provides:
- `RouteBuilder` life-cycle callbacks (https://github.com/apache/camel/pull/3523)
- additional hook to intercept `camel-main` life-cycle events (https://github.com/apache/camel/pull/3524)
- options to set duration related events to `camel-main` (https://github.com/apache/camel/pull/3525)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services