KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > core > component > proxy > Interceptor


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.core.component.proxy;
19
20 /**
21  * <p>This interface represents the abilities of a decorator to be
22  * added to a Component's interceptor chain. The interceptor chain is called
23  * from a component's facade for each invocation on that component.</p>
24  *
25  * Copyright 2003 Sapient
26  * @since carbon 2.0
27  * @author Greg Hinkle, March 2003
28  * @version $Revision: 1.4 $($Author: dvoet $ / $Date: 2003/05/05 21:21:14 $)
29  */

30 public interface Interceptor extends Decorator {
31
32     /**
33      * This method sets the next interceptor as the next in the chain from the
34      * current interceptor.
35      * @param interceptor the next interceptor in the chain
36      */

37     void setNextInterceptor(Interceptor interceptor);
38
39     /**
40      * This method must implement the invocation of any necessary actions and
41      * the chaining the next interceptor.
42      * @param invocation the invocation to execute
43      * @return the results of the invocation's execution
44      * @throws Throwable indicates an error on the invocation chain
45      */

46     Object JavaDoc invoke(Invocation invocation) throws Throwable JavaDoc;
47 }
48
Popular Tags