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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to