camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CAMEL-541) The spi package should not depend on the processor package
Date Sat, 24 May 2008 16:19:54 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christian Schneider updated CAMEL-541:
--------------------------------------

    Attachment: interceptor.patch

Create interfaces for Interceptor and DelegateProcessor and move the interfaces to spi. The
implementation classes are renamed to DefaultInterceptor and DefaultDelegateProcessor. All
classes that reference these are changed to use only the interfaces where possible.


> The spi package should not depend on the processor package
> ----------------------------------------------------------
>
>                 Key: CAMEL-541
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-541
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0
>            Reporter: Christian Schneider
>             Fix For: 1.4.0
>
>         Attachments: interceptor.patch
>
>
> I have found one other problem in RouteContext. The method intercept uses the class Interceptor
from processor. I think Interceptor should be an interface that should reside in spi or camel.
So we could avoid referencing the processor package from spi.
> When I look into the current Interceptor implementation I think the two main methods
that need to be in the interface are process and proceed. Process can be inherited from Processor
but proceed is only declared in the implementation class DelegateProcessor. So I think the
clean way to handle this would be to create an interface DelegateProcessor and a spearate
DefaultDelegateProcessor.
> public interface DelegateProcessor extends Processor {
>  /** * Proceed with the underlying delegated processor */ 
> public abstract void proceed(Exchange exchange) throws Exception;
>  }
> and an interface Interceptor
> public interface Interceptor extends DelegateProcessor { 
> public abstract void process(Exchange exchange) throws Exception; public abstract Processor
getInterceptorLogic(); public abstract void setInterceptorLogic(Processor interceptorLogic);

> }
> When we put these to spi and use them instead of the implementations where possible the
spi would not depend on processor anymore. 

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


Mime
View raw message