KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > kernel > proxy > ProxyManager


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * 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  */

17 package org.apache.geronimo.kernel.proxy;
18
19 import org.apache.geronimo.gbean.AbstractName;
20
21 /**
22  * Manages kernel proxies. Note that all proxies will include an
23  * implementation of GeronimoManagedBean.
24  *
25  * @see org.apache.geronimo.kernel.proxy.GeronimoManagedBean
26  *
27  * @version $Rev: 476457 $ $Date: 2006-11-18 01:49:20 -0500 (Sat, 18 Nov 2006) $
28  */

29 public interface ProxyManager {
30
31
32     /**
33      * Creates a proxy factory for GBeans which will implement the specified types. The proxy class will be created
34      * within the specified class loader. All of the specified types must be visible from the class loader.
35      *
36      * @param types the type of the proxies this factory should create
37      * @param classLoader the class loader in which the proxy class will be registered
38      * @return the proxy factory
39      */

40     ProxyFactory createProxyFactory(Class JavaDoc[] types, ClassLoader JavaDoc classLoader);
41
42     public Object JavaDoc createProxy(AbstractName target, ClassLoader JavaDoc loader);
43
44     public Object JavaDoc createProxy(AbstractName target, Class JavaDoc type);
45
46     /**
47      * Cleans up and resources associated with the proxy
48      * @param proxy the proxy to destroy
49      */

50     public void destroyProxy(Object JavaDoc proxy);
51
52     /**
53      * Is the specified object a proxy
54      * @param object the object to determin if it is a proxy
55      * @return true if the object is a proxy
56      */

57     public boolean isProxy(Object JavaDoc object);
58
59     /**
60      * Get the object name of the specified proxy
61      * TODO convert to abstractName
62      * @param proxy the proxy to get the target object name from
63      * @return the object name of the target
64      */

65     public AbstractName getProxyTarget(Object JavaDoc proxy);
66 }
67
Popular Tags