01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.kernel.proxy;
17:
18: import org.apache.geronimo.gbean.AbstractName;
19:
20: /**
21: * Manages kernel proxies. Note that all proxies will include an
22: * implementation of GeronimoManagedBean.
23: *
24: * @see org.apache.geronimo.kernel.proxy.GeronimoManagedBean
25: *
26: * @version $Rev: 476457 $ $Date: 2006-11-17 22:49:20 -0800 (Fri, 17 Nov 2006) $
27: */
28: public interface ProxyManager {
29:
30: /**
31: * Creates a proxy factory for GBeans which will implement the specified types. The proxy class will be created
32: * within the specified class loader. All of the specified types must be visible from the class loader.
33: *
34: * @param types the type of the proxies this factory should create
35: * @param classLoader the class loader in which the proxy class will be registered
36: * @return the proxy factory
37: */
38: ProxyFactory createProxyFactory(Class[] types,
39: ClassLoader classLoader);
40:
41: public Object createProxy(AbstractName target, ClassLoader loader);
42:
43: public Object createProxy(AbstractName target, Class type);
44:
45: /**
46: * Cleans up and resources associated with the proxy
47: * @param proxy the proxy to destroy
48: */
49: public void destroyProxy(Object proxy);
50:
51: /**
52: * Is the specified object a proxy
53: * @param object the object to determin if it is a proxy
54: * @return true if the object is a proxy
55: */
56: public boolean isProxy(Object object);
57:
58: /**
59: * Get the object name of the specified proxy
60: * TODO convert to abstractName
61: * @param proxy the proxy to get the target object name from
62: * @return the object name of the target
63: */
64: public AbstractName getProxyTarget(Object proxy);
65: }
|