01: /*
02: * The contents of this file are subject to the Sapient Public License
03: * Version 1.0 (the "License"); you may not use this file except in compliance
04: * with the License. You may obtain a copy of the License at
05: * http://carbon.sf.net/License.html.
06: *
07: * Software distributed under the License is distributed on an "AS IS" basis,
08: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
09: * 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: import org.sape.carbon.core.component.ComponentConfiguration;
21: import org.sape.carbon.core.component.FunctionalInterface;
22: import org.sape.carbon.core.config.Configuration;
23:
24: /**
25: * <p>Implementations of this interface construct decorators and interceptors
26: * to be used from within the component facade. Instances of these factories
27: * are built and used by the
28: * {@link org.sape.carbon.core.component.factory.ComponentFactory}.</p>
29: *
30: * Copyright 2003 Sapient
31: * @since carbon 2.0
32: * @author Greg Hinkle, March 2003
33: * @version $Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:14 $)
34: */
35: public interface DecoratorFactory {
36:
37: /**
38: * <p>Constructs a component interceptor. The parameters of this method
39: * encompass all the information known about a component at the time
40: * it is constructed.</p>
41: *
42: * @param functionalImplementation The functional implementation of the
43: * component. This is supplied for cases where the
44: * interceptor needs to access the functional implementation
45: * object directly.
46: * @param componentConfiguration configuration of the component
47: * being proxied
48: * @param proxyInvocationHandler the invocation handler object that backs
49: * @param decoratorConfiguration a custom configuration object for the
50: * interceptor
51: * @return The <code>Decorator</code> that was built by this factory
52: */
53: Decorator getInstance(FunctionalInterface functionalImplementation,
54: ComponentConfiguration componentConfiguration,
55: ComponentProxyInvocationHandler proxyInvocationHandler,
56: Configuration decoratorConfiguration);
57: }
|