Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 97111 invoked from network); 1 Mar 2009 10:18:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2009 10:18:22 -0000 Received: (qmail 35634 invoked by uid 500); 1 Mar 2009 10:18:22 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 35618 invoked by uid 500); 1 Mar 2009 10:18:22 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 35607 invoked by uid 500); 1 Mar 2009 10:18:22 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 35604 invoked by uid 99); 1 Mar 2009 10:18:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 02:18:22 -0800 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; Sun, 01 Mar 2009 10:18:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B09F5234C4A8 for ; Sun, 1 Mar 2009 02:17:59 -0800 (PST) Message-ID: <573539408.1235902679722.JavaMail.jira@brutus> Date: Sun, 1 Mar 2009 02:17:59 -0800 (PST) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Assigned: (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:all-tabpanel ] Claus Ibsen reassigned CAMEL-541: --------------------------------- Assignee: Claus Ibsen > 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, 1.4.0 > Reporter: Christian Schneider > Assignee: Claus Ibsen > Fix For: 2.0.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.