Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 97105 invoked from network); 6 Jun 2008 09:48:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2008 09:48:22 -0000 Received: (qmail 71207 invoked by uid 500); 6 Jun 2008 09:48:24 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 71195 invoked by uid 500); 6 Jun 2008 09:48:24 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 71184 invoked by uid 99); 6 Jun 2008 09:48:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 02:48:23 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jun 2008 09:47:43 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 48216234C131 for ; Fri, 6 Jun 2008 02:48:00 -0700 (PDT) Message-ID: <384433399.1212745680290.JavaMail.jira@brutus> Date: Fri, 6 Jun 2008 02:48:00 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-541) The spi package should not depend on the processor package In-Reply-To: <189370057.1211446254395.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43291#action_43291 ] Claus Ibsen commented on CAMEL-541: ----------------------------------- Hadrian has committed some parts of this to the trunk as of CAMEL-547. Christian I do think you should do a fresh start to see how we are with the tangles and create new patches. > 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.