camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Commented: (CAMEL-264) The spi package should not depend on implementation packages
Date Tue, 13 May 2008 19:11:43 GMT


Claus Ibsen commented on CAMEL-264:

RouteContext should not have been in the impl package from the start but just in the camel
package along side CamelContext and it should have been an interface.

Maybe a refactor could do to extract an interface for RouteContext and a class for DefaultRouteContext
in the impl package. Then all spi classes is not dependent on any impl classes.

> The spi package should not depend on implementation packages
> ------------------------------------------------------------
>                 Key: CAMEL-264
>                 URL:
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Christian Schneider
>             Fix For: 1.4.0
>         Attachments: Main cluster (12).png, new Main cluster (12).png
> Currently spi.LifecycleStrategy depends on impl.RouteContext.
> This is bad because the spi is an interface package that should have no dependencies
on implementation packages.
> The solution is to rename RouteContext to RouteContextImpl, extract an interface class
RouteContext from the implementation and put this interface into spi. So spi is self contained.
> The other problem is that spi.InstrumentationAgent depends on management.CamelNamingStrategy.
In this case I would suggest to simply remove the method getNamingStrategy from the IntrumentationAgent.
Instead I add the naming strategy param to the constructor of InstrumentationLifecycleStrategy.
So the dependency disappears. Of course this way the naming strategy is no longer part of
the spi but I think it is an internal thing anyway. What do you think?
> I will attach a patch for the issues.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message